printf fix: Decrease rdi if padding is not 0 and specifier is invalid (assure '%' is printed)
This commit is contained in:
@@ -297,6 +297,10 @@ printf:
|
||||
|
||||
;--- Invalid ---;
|
||||
.invalidReplacement:
|
||||
test r12, r12
|
||||
jz .irNoPadding
|
||||
dec rdi
|
||||
.irNoPadding:
|
||||
cmp byte [rdi + 1], '\'
|
||||
je .invalidReplacement_specialChar; '%\n' would become "'%','\','n'" instead of "'%',EOS" when inserting full invalid specifier.
|
||||
mov r9w, word [rdi]
|
||||
|
Reference in New Issue
Block a user