From d7ce1d2b192adbfe9e78697612d159bcc37dc43e Mon Sep 17 00:00:00 2001 From: Ruediger Hanke Date: Fri, 26 Apr 2002 18:52:33 +0000 Subject: Fix for the DOTTDEMO memory overwrite crash that happened at least on MorphOS svn-id: r4095 --- resource.cpp | 1 + scumm.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3