From 3dfa4232ba8a1d242f6356005fbee33e023a0ac1 Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 1 May 2019 14:00:35 +0200 Subject: [PATCH] Use VmCreateMemObj() to create $this. --- engine/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/vm.c b/engine/vm.c index e3089dc..ae7da96 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -4610,7 +4610,7 @@ static sxi32 VmByteCodeExec( if((pVmFunc->iFlags & VM_FUNC_CLASS_METHOD) && pThis) { /* Install the '$this' variable */ static const SyString sThis = { "this", sizeof("this") - 1 }; - pObj = VmExtractMemObj(&(*pVm), &sThis, FALSE, TRUE); + pObj = VmCreateMemObj(&(*pVm), &sThis, FALSE); if(pObj) { /* Reflect the change */ pObj->x.pOther = pThis;