aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorLars Skovlund2010-01-28 15:01:28 +0000
committerLars Skovlund2010-01-28 15:01:28 +0000
commit1ceaf349486a76908f9336ceef517790967b13ed (patch)
treea3e261725972206e12d035c2fc6468924a13aa1c /engines/sci/engine
parent104cc92d6be9928b252f65c7636109a001e3e0b1 (diff)
downloadscummvm-rg350-1ceaf349486a76908f9336ceef517790967b13ed.tar.gz
scummvm-rg350-1ceaf349486a76908f9336ceef517790967b13ed.tar.bz2
scummvm-rg350-1ceaf349486a76908f9336ceef517790967b13ed.zip
Handle calls to NewNode() with just one parameter.
Takes care of Phantasmagoria, Torin, etc. svn-id: r47643
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/klists.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 6c945ad384..48de11c8a3 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -171,7 +171,11 @@ reg_t _k_new_node(EngineState *s, reg_t value, reg_t key) {
}
reg_t kNewNode(EngineState *s, int argc, reg_t *argv) {
- s->r_acc = _k_new_node(s, argv[0], argv[1]);
+
+ if (argc == 1)
+ s->r_acc = _k_new_node(s, argv[0], argv[0]);
+ else
+ s->r_acc = _k_new_node(s, argv[0], argv[1]);
debugC(2, kDebugLevelNodes, "New nodebase at %04x:%04x\n", PRINT_REG(s->r_acc));