about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-08-09 14:06:38 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-08-09 14:06:38 +0200
commit4d9559f3454a466876d39b588c365a2b76e87e83 (patch)
tree5605d3f241a3f25bb5bb063e4b40410f8ad9b46e /src/emu
parented63000e23835932bdfd45066dd0ca54fb31e414 (diff)
downloadbox64-4d9559f3454a466876d39b588c365a2b76e87e83.tar.gz
box64-4d9559f3454a466876d39b588c365a2b76e87e83.zip
Added handling of longjmp inside signals handler (from box86)
Diffstat (limited to 'src/emu')
-rwxr-xr-xsrc/emu/x64emu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emu/x64emu.c b/src/emu/x64emu.c
index f65e6312..907c0acc 100755
--- a/src/emu/x64emu.c
+++ b/src/emu/x64emu.c
@@ -466,7 +466,8 @@ void EmuCall(x64emu_t* emu, uintptr_t addr)
     emu->quit = 0;  // reset Quit flags...
     emu->df = d_none;
     if(emu->quitonlongjmp && emu->longjmp) {
-        emu->longjmp = 0;   // don't change anything because of the longjmp
+        if(emu->quitonlongjmp==1)
+            emu->longjmp = 0;   // don't change anything because of the longjmp
     } else {
         R_RBX = old_rbx;
         R_RDI = old_rdi;