aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-07-01 02:18:01 +0000
committerJames Brown2002-07-01 02:18:01 +0000
commitde3fed237ff55c9f82746363530698f75e2bfaa9 (patch)
tree95e9444a6839367d73cd0a6d84cc8c72a1eeda63
parent89381b6657ccee31fa0864a4fea36ab2957d06e3 (diff)
downloadscummvm-rg350-de3fed237ff55c9f82746363530698f75e2bfaa9.tar.gz
scummvm-rg350-de3fed237ff55c9f82746363530698f75e2bfaa9.tar.bz2
scummvm-rg350-de3fed237ff55c9f82746363530698f75e2bfaa9.zip
Increase fault tolerence re: wrongly implemented parsing for String.cpp
svn-id: r4443
-rw-r--r--string.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/string.cpp b/string.cpp
index 4513ff12ca..0877fb6895 100644
--- a/string.cpp
+++ b/string.cpp
@@ -623,8 +623,10 @@ byte *Scumm::addMessageToStack(byte *msg)
if (ptr == NULL)
error("Message stack not allocated");
- if (msg == NULL)
- error("Bad message in addMessageToStack");
+ if (msg == NULL) {
+ warning("Bad message in addMessageToStack, ignoring");
+ return NULL;
+ }
while ((chr = *msg++) != 0) {
if (num > 500)