From 5c176207e1435ba3d40aa946934e078f19f55f37 Mon Sep 17 00:00:00 2001 From: belliash Date: Tue, 28 May 2019 11:51:13 +0200 Subject: [PATCH] Set base class only when $base called. --- engine/vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/vm.c b/engine/vm.c index 6bcff99..8b654fc 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -4159,7 +4159,9 @@ static sxi32 VmByteCodeExec( PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Attempt to call parent class from non-inheritance instance of class '%z'", &pClass->sName); } - pClass = pClass->pBase; + if(pNos->iFlags == MEMOBJ_BASE) { + pClass = pClass->pBase; + } } /* Extract attribute name first */ SyStringInitFromBuf(&sName, (const char *)SyBlobData(&pTos->sBlob), SyBlobLength(&pTos->sBlob));