Correctly set padding length when using prefix (fixes #1)
This commit is contained in:
@@ -256,7 +256,6 @@ utoa:
|
||||
test r15, r15 ;prefix now? (padding with spaces; r15 is zero)
|
||||
jnz .checkPadding
|
||||
insert_prefix
|
||||
add r14, 2
|
||||
|
||||
.checkPadding:
|
||||
; Substract length of converted number from padLen
|
||||
@@ -264,6 +263,13 @@ utoa:
|
||||
cmp r14, 0
|
||||
jle .checkPrefix
|
||||
mov rcx, r14
|
||||
test r13, r13
|
||||
jns .addPadding
|
||||
test r15, r15
|
||||
jz .addPadding
|
||||
sub rcx, 2
|
||||
cmp rcx, 2
|
||||
jl .checkPrefix
|
||||
.addPadding:
|
||||
mov byte [r10], r11b
|
||||
inc r10
|
||||
|
Reference in New Issue
Block a user