From 1ceaf349486a76908f9336ceef517790967b13ed Mon Sep 17 00:00:00 2001 From: Lars Skovlund Date: Thu, 28 Jan 2010 15:01:28 +0000 Subject: Handle calls to NewNode() with just one parameter. Takes care of Phantasmagoria, Torin, etc. svn-id: r47643 --- engines/sci/engine/klists.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/sci/engine') 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)); -- cgit v1.2.3