aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorJames Brown2002-05-14 19:44:41 +0000
committerJames Brown2002-05-14 19:44:41 +0000
commitaad1bf41048e30f016cc224cf9b8b5916f438198 (patch)
treed2c3f943119f4456912348faf699bec23ff167b3 /simon
parentcaf961bfcbf207763c3d69a23d0171784088f1fb (diff)
downloadscummvm-rg350-aad1bf41048e30f016cc224cf9b8b5916f438198.tar.gz
scummvm-rg350-aad1bf41048e30f016cc224cf9b8b5916f438198.tar.bz2
scummvm-rg350-aad1bf41048e30f016cc224cf9b8b5916f438198.zip
fix some warnings, odd code, and prevent Simon segfaulting when wrong game specified.
svn-id: r4321
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index add8f42bb5..ce05f73b66 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -427,6 +427,9 @@ byte *SimonState::readSingleOpcode(FILE *in, byte *ptr) {
i = 0;
string_ptr = table[*ptr++];
+ if (!string_ptr)
+ error("Unable to locate opcode table. Perhaps you are using the wrong game target?");
+
for(;;) {
if (string_ptr[i] == ' ')
return ptr;