aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuediger Hanke2002-04-26 18:52:33 +0000
committerRuediger Hanke2002-04-26 18:52:33 +0000
commitd7ce1d2b192adbfe9e78697612d159bcc37dc43e (patch)
tree551507cfd03c69d25aea8c714808caf040df15e6
parentf24777a998a97df46cc9261fa2fb82243a69a487 (diff)
downloadscummvm-rg350-d7ce1d2b192adbfe9e78697612d159bcc37dc43e.tar.gz
scummvm-rg350-d7ce1d2b192adbfe9e78697612d159bcc37dc43e.tar.bz2
scummvm-rg350-d7ce1d2b192adbfe9e78697612d159bcc37dc43e.zip
Fix for the DOTTDEMO memory overwrite crash that happened at least on MorphOS
svn-id: r4095
-rw-r--r--resource.cpp1
-rw-r--r--scumm.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/resource.cpp b/resource.cpp
index 01339bfb2b..3b3b26d324 100644
--- a/resource.cpp
+++ b/resource.cpp
@@ -423,6 +423,7 @@ void Scumm::loadCharset(int no)
memset(_charsetData, 0, sizeof(_charsetData));
+ assert(no < sizeof(_charsetData)/16);
checkRange(_maxCharsets - 1, 1, no, "Loading illegal charset %d");
// ensureResourceLoaded(6, no);
diff --git a/scumm.h b/scumm.h
index d384b6e84e..2e87d9e42b 100644
--- a/scumm.h
+++ b/scumm.h
@@ -1294,7 +1294,7 @@ public:
CharsetRenderer charset;
byte _charsetColor;
uint16 _noSubtitles; // Skip all subtitles?
- byte _charsetData[10][16];
+ byte _charsetData[15][16];
void initCharset(int charset);
void restoreCharsetBg();
int hasCharsetMask(int x, int y, int x2, int y2);