From b0cd488f4fe3b1e448359d4246538519c5486a63 Mon Sep 17 00:00:00 2001 From: otya128 Date: Fri, 23 Dec 2016 20:58:38 +0900 Subject: [PATCH] Fix common def --- SMILEBASIC/VM.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SMILEBASIC/VM.d b/SMILEBASIC/VM.d index da684c0..0381cb3 100644 --- a/SMILEBASIC/VM.d +++ b/SMILEBASIC/VM.d @@ -1406,10 +1406,6 @@ class CallFunctionCode : Code { throw new IllegalFunctionCall(name.to!string); } - if (func.isCommon) - { - vm.setCurrentSlot(func.slot.index); - } vm.pushBackTrace(name); //TODO:args auto bp = vm.stacki; @@ -1426,6 +1422,10 @@ class CallFunctionCode : Code vm.stack[bp + v.index] = Value(v.type); } } + if (func.isCommon) + { + vm.setCurrentSlot(func.slot.index); + } } override string toString(VM vm) {