From 8221b239c2d9b8214f0ed0cdd88517b86df26498 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Thu, 12 Jan 2023 04:43:12 -0500 Subject: Fix bug in exit routine If an error condition is met during the pipe IO syscalls, eax will be filled with a negative value. We need to then zero the rest of the register before attempting to exit, so we don't continue on to execute garbage. Signed-off-by: Malfurious --- lace_x86.asm | 1 + 1 file changed, 1 insertion(+) (limited to 'lace_x86.asm') diff --git a/lace_x86.asm b/lace_x86.asm index 8c8ed14..5579d58 100644 --- a/lace_x86.asm +++ b/lace_x86.asm @@ -144,5 +144,6 @@ pipe_cont: jmp pipe ; loop exit: + xor eax, eax mov al, 1 int 0x80 -- cgit v1.2.3