Use VmCreateMemObj() to create $this.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-05-01 14:00:35 +02:00
parent 7c37451520
commit 3dfa4232ba
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 1 additions and 1 deletions

View File

@ -4610,7 +4610,7 @@ static sxi32 VmByteCodeExec(
if((pVmFunc->iFlags & VM_FUNC_CLASS_METHOD) && pThis) { if((pVmFunc->iFlags & VM_FUNC_CLASS_METHOD) && pThis) {
/* Install the '$this' variable */ /* Install the '$this' variable */
static const SyString sThis = { "this", sizeof("this") - 1 }; static const SyString sThis = { "this", sizeof("this") - 1 };
pObj = VmExtractMemObj(&(*pVm), &sThis, FALSE, TRUE); pObj = VmCreateMemObj(&(*pVm), &sThis, FALSE);
if(pObj) { if(pObj) {
/* Reflect the change */ /* Reflect the change */
pObj->x.pOther = pThis; pObj->x.pOther = pThis;