commit e7af432ebbe04edad5e65af0df4f46549722039a
parent 8fc237b9471c89826685d7268f77eb83796e4dfd
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 11 Jan 2025 13:33:43 +0100
libc/amd64: Fix +1 error in strcmp.s
Strcmp must check until the '\0' to verify that both strings
finishes when the comparision is done.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libc/arch/amd64/strcmp.s b/src/libc/arch/amd64/strcmp.s
@@ -11,7 +11,7 @@ strcmp:
repne
scasb
- leaq -1(%rdi),%rcx
+ leaq 0(%rdi),%rcx
subq %r8,%rcx
movq %r8,%rdi