diff options
author | Lars Skovlund | 2010-01-28 15:01:28 +0000 |
---|---|---|
committer | Lars Skovlund | 2010-01-28 15:01:28 +0000 |
commit | 1ceaf349486a76908f9336ceef517790967b13ed (patch) | |
tree | a3e261725972206e12d035c2fc6468924a13aa1c /engines/sci/engine | |
parent | 104cc92d6be9928b252f65c7636109a001e3e0b1 (diff) | |
download | scummvm-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.cpp | 6 |
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)); |