:: commit 96f8c65f01a9bfa5cb2dc04616f9dad9797d743c

mintsuki <mintsuki@protonmail.com> — 2020-04-30 21:29

parents: 8db7cdcbd1

Fix bug where eax was trashed in pit_sleep_and_wait_for_keypress()

diff --git a/src/lib/blib.c b/src/lib/blib.c
index 53821780..4337ae33 100644
--- a/src/lib/blib.c
+++ b/src/lib/blib.c
@@ -177,7 +177,9 @@ int pit_sleep_and_quit_on_keypress(uint32_t ticks) {
         "pop ebx\n\t"
 
         // Exit
+        "push eax\n\t"
         "call dehook_int_08\n\t"
+        "pop eax\n\t"
         "ret\n\t"
     );
     (void)ticks;
tab: 248 wrap: offon