Browse Source

Use debug trace only if VM is really executing some code.

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

+ 1
- 1
engine/vm.c View File

@ -1920,7 +1920,7 @@ PH7_PRIVATE sxi32 PH7_VmThrowError(
sxu32 nLine;
SyString sFileName;
SyString *pFile;
if((VmExtractDebugTrace(&(*pVm), &pDebug) == SXRET_OK) && (SySetUsed(&pDebug) > 0)) {
if((pVm->nMagic == PH7_VM_EXEC) && (VmExtractDebugTrace(&(*pVm), &pDebug) == SXRET_OK) && (SySetUsed(&pDebug) > 0)) {
/* Extract file name and line number from debug trace */
SySetGetNextEntry(&pDebug, (void **)&pTrace);
pFile = pTrace->pFile;


Loading…
Cancel
Save