aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/klists.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-30 09:51:21 +0000
committerFilippos Karapetis2010-06-30 09:51:21 +0000
commit8752eed8f241ae2c405a2818b3e30ef735019662 (patch)
tree0c3383de3c3508cf6e488a5ccb0df13902155ba9 /engines/sci/engine/klists.cpp
parent7595e7c1bec5e56e9ddaabea4b6af43423e8e002 (diff)
downloadscummvm-rg350-8752eed8f241ae2c405a2818b3e30ef735019662.tar.gz
scummvm-rg350-8752eed8f241ae2c405a2818b3e30ef735019662.tar.bz2
scummvm-rg350-8752eed8f241ae2c405a2818b3e30ef735019662.zip
SCI: Reverting r50516, SSCI didn't reset the node value when deleting the node. Also, a slight fix in VM debug code.
svn-id: r50521
Diffstat (limited to 'engines/sci/engine/klists.cpp')
-rw-r--r--engines/sci/engine/klists.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 25df4bb563..6842c9b1d8 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -346,12 +346,11 @@ reg_t kDeleteKey(EngineState *s, int argc, reg_t *argv) {
if (!n->succ.isNull())
s->_segMan->lookupNode(n->succ)->pred = n->pred;
- // Erase the node itself, as the game might reference it again.
- // Happens in the intro of QFG1 and in Longbow, when exiting the
- // cave.
+ // Erase references to the predecessor and successor nodes, as the game
+ // scripts could reference the node itself again.
+ // Happens in the intro of QFG1 and in Longbow, when exiting the cave.
n->pred = NULL_REG;
n->succ = NULL_REG;
- n->value = NULL_REG;
return make_reg(0, 1); // Signal success
}