From 88fd51e06db1143405619c87e8d9e9ced146dbb1 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Fri, 13 Jan 2023 01:34:40 -0500 Subject: Fix error handling for open() call Zero is a valid return value, so don't jmp to exit if the fd is equal to it. However, we would never expect zero to be returned as stdin is not closed. Signed-off-by: Malfurious --- lace_x86.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lace_x86.asm') diff --git a/lace_x86.asm b/lace_x86.asm index 5579d58..cee44da 100644 --- a/lace_x86.asm +++ b/lace_x86.asm @@ -78,7 +78,7 @@ _start: cmp eax, 0 ; if fail, exit(1) mov bl, 1 - jle exit + jl exit sub esp, 16 ; alloc struct sockaddr_in -- cgit v1.2.3