aboutsummaryrefslogtreecommitdiff
path: root/sword2/interpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sword2/interpreter.cpp')
-rw-r--r--sword2/interpreter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/sword2/interpreter.cpp b/sword2/interpreter.cpp
index 396f09128d..cf292bd0f5 100644
--- a/sword2/interpreter.cpp
+++ b/sword2/interpreter.cpp
@@ -301,6 +301,7 @@ int Logic::runScript(char *scriptData, char *objectData, uint32 *offset) {
int caseCount;
bool foundCase;
int32 ptrval;
+ int i;
curCommand = code[ip++];
@@ -464,7 +465,7 @@ int Logic::runScript(char *scriptData, char *objectData, uint32 *offset) {
// Search the cases
foundCase = false;
- for (int i = 0; i < caseCount && !foundCase; i++) {
+ for (i = 0; i < caseCount && !foundCase; i++) {
if (value == (int32) READ_LE_UINT32(code + ip)) {
// We have found the case, so lets
// jump to it