summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-01-13 01:34:40 -0500
committerMalfurious <m@lfurio.us>2023-01-13 01:34:40 -0500
commit88fd51e06db1143405619c87e8d9e9ced146dbb1 (patch)
treed8f7c0f46bab5339c0a61d434c36150df82c504e
parent8221b239c2d9b8214f0ed0cdd88517b86df26498 (diff)
downloadlace-88fd51e06db1143405619c87e8d9e9ced146dbb1.tar.gz
lace-88fd51e06db1143405619c87e8d9e9ced146dbb1.zip
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 <m@lfurio.us>
-rw-r--r--lace_x86.asm2
1 files changed, 1 insertions, 1 deletions
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