diff --git a/src/ft_read.s b/src/ft_read.s index 3cbabc3..5eb489c 100644 --- a/src/ft_read.s +++ b/src/ft_read.s @@ -7,6 +7,7 @@ section .text ft_read: cmp rsi, 0 ; check if the buffer is NULL + mov rax, -1 ; set the return value to -1 (for error) (UB) je .exit ; if true go to exit mov rax, 0 ; syscall 0 is for read syscall ; call the system call read