[Scummvm-cvs-logs] SF.net SVN: scummvm:[49984] scummvm/trunk/engines/sci/engine/seg_manager. cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Jun 18 03:27:26 CEST 2010
Revision: 49984
http://scummvm.svn.sourceforge.net/scummvm/?rev=49984&view=rev
Author: thebluegr
Date: 2010-06-18 01:27:25 +0000 (Fri, 18 Jun 2010)
Log Message:
-----------
Added a workaround for the KQ1 demo (looks like a script bug)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/seg_manager.cpp
Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp 2010-06-18 01:11:00 UTC (rev 49983)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp 2010-06-18 01:27:25 UTC (rev 49984)
@@ -528,15 +528,23 @@
if (addr.isNull())
return NULL; // Non-error null
- if (getSegmentType(addr.segment) != SEG_TYPE_NODES) {
- error("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr));
+ SegmentType type = getSegmentType(addr.segment);
+
+ if (type != SEG_TYPE_NODES) {
+ if (g_sci->getGameId() == "kq1sci") {
+ // The demo of KQ1 is trying to use an invalid memory reference as a list node
+ warning("Attempt to use non-node %04x:%04x (type %d) as list node", PRINT_REG(addr), type);
+ return NULL;
+ }
+
+ error("Attempt to use non-node %04x:%04x (type %d) as list node", PRINT_REG(addr), type);
return NULL;
}
NodeTable *nt = (NodeTable *)_heap[addr.segment];
if (!nt->isValidEntry(addr.offset)) {
- error("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr));
+ error("Attempt to use invalid reference %04x:%04x as list node", PRINT_REG(addr));
return NULL;
}
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