[Scummvm-cvs-logs] CVS: tools descumm6.cpp,1.61,1.62
Max Horn
fingolfin at users.sourceforge.net
Tue Dec 24 17:35:04 CET 2002
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv660
Modified Files:
descumm6.cpp
Log Message:
fix stray '} else {'
Index: descumm6.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm6.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- descumm6.cpp 25 Dec 2002 01:20:13 -0000 1.61
+++ descumm6.cpp 25 Dec 2002 01:34:53 -0000 1.62
@@ -1244,9 +1244,12 @@
int offset = get_signed_word();
int cur = get_curoffs();
int to = cur + offset;
-
if (!dontOutputElse && maybeAddElse(cur, to)) {
- pendingElse = true;
+ // In order to avoid stray lonely "} else {" from occuring, we check
+ // for offset = 1. These cases really constitute NOPs, obviously.
+ // But apparently they were generated by the script compiler for
+ // switch/case constructs.
+ pendingElse = (offset != 1);
pendingElseTo = to;
pendingElseOffs = cur - 1;
pendingElseOpcode = g_jump_opcode;
More information about the Scummvm-git-logs
mailing list