Fixed more segfaults, final commit ?

This commit is contained in:
2024-03-18 13:40:09 +01:00
parent ddabaeba7f
commit 56d82c386f
8 changed files with 44 additions and 32 deletions

View File

@@ -2,16 +2,16 @@ global ft_read
extern __errno_location
ft_read:
mov eax, 0x11
mov eax, 0
syscall
test rax, rax
js .error
ret
.error:
mov ebx, eax
mov rdx, rax
call __errno_location wrt ..plt
neg ebx
mov dword [rax], ebx
neg rdx
mov [rax], rdx
mov rax, -1
ret