aboutsummaryrefslogtreecommitdiff
path: root/saga/saga.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'saga/saga.cpp')
-rw-r--r--saga/saga.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/saga/saga.cpp b/saga/saga.cpp
index 657f0fc4cd..6d06a149d7 100644
--- a/saga/saga.cpp
+++ b/saga/saga.cpp
@@ -330,7 +330,7 @@ void SagaEngine::loadStrings(StringsTable &stringsTable, const byte *stringsPoin
error("Invalid string offset");
}
- stringsCount = offset / 2;
+ stringsCount = offset / 2 - 2;
stringsTable.stringsCount = stringsCount;
stringsTable.strings = (const char **)malloc(stringsCount * sizeof(const char *));
@@ -345,6 +345,7 @@ void SagaEngine::loadStrings(StringsTable &stringsTable, const byte *stringsPoin
error("invalid string offset");
}
stringsTable.strings[i] = (const char *)stringsTable.stringsPointer + offset;
+ debug(9, "string[%i]=%s", i, stringsTable.strings[i]);
}
}