fix bonus rule and fix error in write and read (returned -1 instead of 0)

This commit is contained in:
2025-08-06 14:29:40 +02:00
parent e6c4b33fc1
commit 49501469c8
3 changed files with 6 additions and 8 deletions

View File

@ -7,7 +7,7 @@ ft_read:
syscall
cmp rax, 0 ; if return is < 0, it's an error in negative
jg success
jge success
neg rax ; inv errno, and set errno
mov edi, eax

View File

@ -7,7 +7,7 @@ ft_write:
syscall
cmp rax, 0 ; if return is < 0, it's an error in negative
jg success
jge success
neg rax ; inv errno, and set errno
mov edi, eax