[Scummvm-cvs-logs] SF.net SVN: scummvm:[52447] scummvm/trunk/engines/sci/engine/kmenu.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Aug 30 01:25:31 CEST 2010
Revision: 52447
http://scummvm.svn.sourceforge.net/scummvm/?rev=52447&view=rev
Author: thebluegr
Date: 2010-08-29 23:25:30 +0000 (Sun, 29 Aug 2010)
Log Message:
-----------
SCI: Fixed bug #3038767 - "SCI Fanmade - Cascade Quest: Crash when restoring a game"
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kmenu.cpp
Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp 2010-08-29 21:11:36 UTC (rev 52446)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp 2010-08-29 23:25:30 UTC (rev 52447)
@@ -46,12 +46,13 @@
uint16 itemId = argv[0].toUint16() & 0xFF;
uint16 attributeId;
int argPos = 1;
+ reg_t value;
while (argPos < argc) {
attributeId = argv[argPos].toUint16();
- if ((argPos + 1) >= argc)
- error("Too few parameters for kSetMenu");
- g_sci->_gfxMenu->kernelSetAttribute(menuId, itemId, attributeId, argv[argPos + 1]);
+ // Happens in the fanmade game Cascade Quest when loading - bug #3038767
+ value = (argPos + 1 < argc) ? argv[argPos + 1] : NULL_REG;
+ g_sci->_gfxMenu->kernelSetAttribute(menuId, itemId, attributeId, value);
argPos += 2;
}
return s->r_acc;
@@ -76,6 +77,11 @@
// Sometimes this is called without giving text, if thats the case dont process it.
text = s->_segMan->getString(textReference);
+ if (text == "Replaying sound") {
+ // Happens in the fanmade game Cascade Quest when loading - ignore it
+ return s->r_acc;
+ }
+
g_sci->_gfxMenu->kernelDrawStatus(g_sci->strSplit(text.c_str(), NULL).c_str(), colorPen, colorBack);
}
return s->r_acc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list