Skip to content

Commit

Permalink
bdshemu: Fix edge case with unsupported instrs
Browse files Browse the repository at this point in the history
Fixes #106
  • Loading branch information
ScimitarEnjoyer committed Sep 23, 2024
1 parent 34a0880 commit 34fe53e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bdshemu/bdshemu_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ ShemuX86Emulate(
// emulated (for example, SYSCALL, INT, system instructions, etc).
if (stop)
{
return SHEMU_ABORT_CANT_EMULATE;
break;
}

// If we already have a detection and we wish to stop on detections, do so now.
Expand Down Expand Up @@ -3568,5 +3568,5 @@ ShemuX86Emulate(
Context->Flags |= SHEMU_FLAG_NOP_SLED;
}

return SHEMU_SUCCESS;
return stop ? SHEMU_ABORT_CANT_EMULATE : SHEMU_SUCCESS;
}

0 comments on commit 34fe53e

Please sign in to comment.