fix bonus rule and fix error in write and read (returned -1 instead of 0)
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user