Fix strcmp() behaviour (ret=-1 --> ret=0)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user