[Scummvm-cvs-logs] SF.net SVN: scummvm: [32467] scummvm/trunk/engines/kyra/resource.cpp
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Sun Jun 1 17:11:10 CEST 2008
Revision: 32467
http://scummvm.svn.sourceforge.net/scummvm/?rev=32467&view=rev
Author: athrxx
Date: 2008-06-01 08:11:08 -0700 (Sun, 01 Jun 2008)
Log Message:
-----------
- fix 'order of evaluation' bug (MSVC release build)
Modified Paths:
--------------
scummvm/trunk/engines/kyra/resource.cpp
Modified: scummvm/trunk/engines/kyra/resource.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource.cpp 2008-06-01 15:10:54 UTC (rev 32466)
+++ scummvm/trunk/engines/kyra/resource.cpp 2008-06-01 15:11:08 UTC (rev 32467)
@@ -878,7 +878,8 @@
int16 b = ((_bitsLeft << 8) | _index) - 1;
_bitsLeft = b >> 8;
_index = b & 0xff;
- return (((val & 3) + 4) << _index) + 0x101 + getKeyMasked(_index);
+ uint16 res = (((val & 3) + 4) << _index) + 0x101;
+ return res + getKeyMasked(_index);
}
void FileExpanderSource::advSrcRefresh() {
@@ -1046,7 +1047,8 @@
_src->advSrcBitsByIndex(offset < 0 ? calcCmdAndIndex(_tables[5], offset) : _tables[1][offset]);
if ((offset & 0xff) >= 4) {
uint8 newIndex = ((offset & 0xff) >> 1) - 1;
- offset = (((offset & 1) + 2) << newIndex) + _src->getKeyMasked(newIndex);
+ offset = (((offset & 1) + 2) << newIndex);
+ offset += _src->getKeyMasked(newIndex);
}
uint8 *s2 = d - 1 - offset;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list