[Scummvm-cvs-logs] CVS: tools descumm-common.cpp,1.1,1.2
Max Horn
fingolfin at users.sourceforge.net
Sat May 10 11:49:05 CEST 2003
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv31841
Modified Files:
descumm-common.cpp
Log Message:
fixed 'while' detecion code for pre-V8 games
Index: descumm-common.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm-common.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- descumm-common.cpp 10 May 2003 18:29:08 -0000 1.1
+++ descumm-common.cpp 10 May 2003 18:48:43 -0000 1.2
@@ -197,13 +197,13 @@
// jump right behind a regular jump, then whether that jump is targeting us.
if (scriptVersion == 8) {
p->isWhile = (*(byte*)(org_pos+to-5) == g_jump_opcode);
- i = TO_LE_32(*(int32*)(org_pos+to-4));
+ i = (int32)TO_LE_32(*(int32*)(org_pos+to-4));
} else {
p->isWhile = (*(byte*)(org_pos+to-3) == g_jump_opcode);
- i = TO_LE_16(*(int16*)(org_pos+to-2));
+ i = (int16)TO_LE_16(*(int16*)(org_pos+to-2));
}
- p->isWhile = p->isWhile && (offs_of_line == (int)to + i);
+ p->isWhile = p->isWhile && (offs_of_line == to + i);
p->from = cur;
p->to = to;
return true;
More information about the Scummvm-git-logs
mailing list