Fix strcmp() behaviour (ret=-1 --> ret=0)

This commit is contained in:
2025-07-10 00:01:26 +02:00
parent 08389a5bb2
commit 7d559d61da

View File

@@ -118,7 +118,7 @@ strclr:
; rdx* Length of str1
; r8* Backup for rdi
strcmp:
mov rax, -1
xor rax, rax
cmp byte [rdi], EOS
je .equal
cmp byte [rsi], EOS
@@ -139,7 +139,7 @@ strcmp:
.equal:
cmp byte [rsi], EOS
jne .quit
mov rax, -1
xor rax, rax
.quit:
ret