Fix strcmp() behaviour (ret=-1 --> ret=0)
This commit is contained in:
@@ -118,7 +118,7 @@ strclr:
|
|||||||
; rdx* Length of str1
|
; rdx* Length of str1
|
||||||
; r8* Backup for rdi
|
; r8* Backup for rdi
|
||||||
strcmp:
|
strcmp:
|
||||||
mov rax, -1
|
xor rax, rax
|
||||||
cmp byte [rdi], EOS
|
cmp byte [rdi], EOS
|
||||||
je .equal
|
je .equal
|
||||||
cmp byte [rsi], EOS
|
cmp byte [rsi], EOS
|
||||||
@@ -139,7 +139,7 @@ strcmp:
|
|||||||
.equal:
|
.equal:
|
||||||
cmp byte [rsi], EOS
|
cmp byte [rsi], EOS
|
||||||
jne .quit
|
jne .quit
|
||||||
mov rax, -1
|
xor rax, rax
|
||||||
|
|
||||||
.quit:
|
.quit:
|
||||||
ret
|
ret
|
||||||
|
Reference in New Issue
Block a user