Fix jumps in tolower/toupper; .dtu/.dtl would always be reached.
This commit is contained in:
8
core.asm
8
core.asm
@ -99,10 +99,10 @@ tolower:
|
|||||||
mov rcx, rax
|
mov rcx, rax
|
||||||
mov al, byte [rdi]
|
mov al, byte [rdi]
|
||||||
cmp rcx, 1
|
cmp rcx, 1
|
||||||
je .dtl
|
jne .quit
|
||||||
.dtl:
|
|
||||||
add al, 32
|
add al, 32
|
||||||
|
|
||||||
|
.quit:
|
||||||
leave
|
leave
|
||||||
ret
|
ret
|
||||||
;----- toupper(char* c) -----;
|
;----- toupper(char* c) -----;
|
||||||
@ -116,9 +116,9 @@ toupper:
|
|||||||
mov rcx, rax
|
mov rcx, rax
|
||||||
mov al, byte [rdi]
|
mov al, byte [rdi]
|
||||||
cmp rcx, 1
|
cmp rcx, 1
|
||||||
je .dtu
|
jne .quit
|
||||||
.dtu:
|
|
||||||
sub al, 32
|
sub al, 32
|
||||||
|
|
||||||
|
.quit:
|
||||||
leave
|
leave
|
||||||
ret
|
ret
|
||||||
|
Reference in New Issue
Block a user