aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-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));