Fix trap handling bug on Windows and add test

This commit is contained in:
Mark McCaskey
2020-02-11 12:08:28 -08:00
parent eaa081e359
commit 132645e0d0
2 changed files with 23 additions and 1 deletions

View File

@ -59,6 +59,7 @@ uint8_t callProtected(trampoline_t trampoline,
// install exception handler
if (exceptionHandlerInstalled == FALSE) {
exceptionHandlerInstalled = TRUE;
alreadyHandlingException = FALSE;
handle = AddVectoredExceptionHandler(CALL_FIRST, exceptionHandler);
}
@ -86,4 +87,4 @@ uint8_t callProtected(trampoline_t trampoline,
removeExceptionHandler();
return FALSE;
}
}