aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-05-01 11:03:41 +0000
committerMax Horn2003-05-01 11:03:41 +0000
commitc77cbc5cb47c1abdac4a4a4b906e21a0861f158b (patch)
treeab669217c0f80d458f5a7c675bd6207f129c6e33
parentf62a4ae83ecbbccd855ec2950c984ba2faeb60f8 (diff)
downloadscummvm-rg350-c77cbc5cb47c1abdac4a4a4b906e21a0861f158b.tar.gz
scummvm-rg350-c77cbc5cb47c1abdac4a4a4b906e21a0861f158b.tar.bz2
scummvm-rg350-c77cbc5cb47c1abdac4a4a4b906e21a0861f158b.zip
Fixed bug #730030: INDY3: Crash when loading new savegames
svn-id: r7240
-rw-r--r--scumm/charset.cpp4
-rw-r--r--scumm/resource.cpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index 6677e60077..ebadc9b371 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -29,7 +29,9 @@ void CharsetRendererCommon::setCurID(byte id) {
_curId = id;
_fontPtr = _vm->getResourceAddress(rtCharset, id);
- assert(_fontPtr);
+ if (_fontPtr == 0)
+ error("CharsetRendererCommon::setCurID: charset %d not found!\n", id);
+
if (_vm->_features & GF_AFTER_V3) {
_nbChars = _fontPtr[4];
_fontPtr += 6 + _nbChars;
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 191b5b79df..d9d0eba892 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -558,7 +558,10 @@ void Scumm::ensureResourceLoaded(int type, int i) {
i = _resourceMapper[i & 0x7F];
}
- if (i == 0)
+ // FIXME - TODO: This check used to be "i==0". However, that causes
+ // problems when using this function to ensure charset 0 is loaded.
+ // Quesetion: Why was this check like that in the first place?
+ if (i < 0)
return;
if (i <= res.num[type])