fix: ft_strcpy
This commit is contained in:
parent
f787b174b1
commit
d05135501f
|
@ -5,10 +5,12 @@ ft_strcpy:
|
||||||
.loop:
|
.loop:
|
||||||
cmp byte [rsi + rax], 0
|
cmp byte [rsi + rax], 0
|
||||||
je .done
|
je .done
|
||||||
mov rdx, [rsi + rax]
|
mov dl, byte [rsi + rax]
|
||||||
mov [rdi + rax], rdx
|
mov byte [rdi + rax], dl
|
||||||
inc rax
|
inc rax
|
||||||
jmp .loop
|
jmp .loop
|
||||||
.done:
|
.done:
|
||||||
|
inc rax
|
||||||
|
mov byte [rdi + rax], 0
|
||||||
mov rax, rdi
|
mov rax, rdi
|
||||||
ret
|
ret
|
||||||
|
|
Loading…
Reference in New Issue