[Scummvm-cvs-logs] CVS: tools descumm.cpp,1.25,1.26
Max Horn
fingolfin at users.sourceforge.net
Thu May 8 17:03:16 CEST 2003
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv4400
Modified Files:
descumm.cpp
Log Message:
endian fix
Index: descumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- descumm.cpp 8 May 2003 22:59:24 -0000 1.25
+++ descumm.cpp 8 May 2003 23:12:31 -0000 1.26
@@ -487,7 +487,6 @@
if (!NumBlockStack)
return 0; /* There are no previous blocks, so an ifelse is not ok */
-
k = to - 3;
if (k < 0 || k >= size_of_code)
return 0; /* Invalid jump */
@@ -495,7 +494,7 @@
if (org_pos[k] != g_jump_opcode)
return 0; /* Invalid jump */
- k = to + *((short *)(org_pos + k + 1));
+ k = to + TO_LE_16(*(int16*)(org_pos + k + 1));
if (k != elseto)
return 0; /* Not an ifelse */
@@ -1537,8 +1536,8 @@
if (RequestElseIfAdd(get_curpos(), PendingElseTo, i)) {
sprintf(after, AlwaysShowOffs ? ") /*%.4X*/ {" : ") {", i);
strcpy(before, "} else ");
- PendingElse = 0;
- HaveElse = 1;
+ PendingElse = false;
+ HaveElse = true;
return true;
}
}
More information about the Scummvm-git-logs
mailing list