[Scummvm-cvs-logs] SF.net SVN: scummvm: [23842] scummvm/trunk/engines/sword2

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sat Sep 9 12:47:36 CEST 2006


Revision: 23842
          http://svn.sourceforge.net/scummvm/?rev=23842&view=rev
Author:   eriktorbjorn
Date:     2006-09-09 03:47:32 -0700 (Sat, 09 Sep 2006)

Log Message:
-----------
Fixed compilation.

Modified Paths:
--------------
    scummvm/trunk/engines/sword2/interpreter.cpp
    scummvm/trunk/engines/sword2/logic.h

Modified: scummvm/trunk/engines/sword2/interpreter.cpp
===================================================================
--- scummvm/trunk/engines/sword2/interpreter.cpp	2006-09-09 10:47:08 UTC (rev 23841)
+++ scummvm/trunk/engines/sword2/interpreter.cpp	2006-09-09 10:47:32 UTC (rev 23842)
@@ -193,7 +193,8 @@
 		OPCODE(fnRefreshInventory),
 		OPCODE(fnChangeShadows)
 	};
-	
+
+	_numOpcodes = ARRAYSIZE(opcodes);
 	_opcodes = opcodes;
 }
 
@@ -609,7 +610,7 @@
 		case CP_CALL_MCODE:
 			// Call an mcode routine
 			Read16ip(parameter);
-			assert(parameter < ARRAYSIZE(opcodes));
+			assert(parameter < _numOpcodes);
 			// amount to adjust stack by (no of parameters)
 			Read8ip(value);
 			debug(9, "CP_CALL_MCODE: '%s', %d", _opcodes[parameter].desc, value);

Modified: scummvm/trunk/engines/sword2/logic.h
===================================================================
--- scummvm/trunk/engines/sword2/logic.h	2006-09-09 10:47:08 UTC (rev 23841)
+++ scummvm/trunk/engines/sword2/logic.h	2006-09-09 10:47:32 UTC (rev 23842)
@@ -184,6 +184,7 @@
 		const char *desc;
 	};
 	const OpcodeEntry *_opcodes;
+	int _numOpcodes;
 	void setupOpcodes();
 
 	int32 fnTestFunction(int32 *params);


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