From de3fed237ff55c9f82746363530698f75e2bfaa9 Mon Sep 17 00:00:00 2001 From: James Brown Date: Mon, 1 Jul 2002 02:18:01 +0000 Subject: Increase fault tolerence re: wrongly implemented parsing for String.cpp svn-id: r4443 --- string.cpp | 6 ++++-- 1 file 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) -- cgit v1.2.3