Browse Source

Fix uninitialized value leading to segmentation fault.

release/v0.1
Rafal Kupiec 3 years ago
parent
commit
37c960e313
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      engine/vm.c

+ 1
- 0
engine/vm.c View File

@ -5493,6 +5493,7 @@ PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm) {
if(!pMethod) {
VmErrorFormat(&(*pVm), PH7_CTX_ERR, "Cannot find a program entry point 'Program::main()'");
}
PH7_MemObjInit(pVm, &pResult);
PH7_VmCallClassMethod(&(*pVm), pInstance, pMethod, &pResult, 0, 0);
if(!pVm->iExitStatus) {
pVm->iExitStatus = ph7_value_to_int(&pResult);


Loading…
Cancel
Save