printf fix: Decrease rdi if padding is not 0 and specifier is invalid (assure '%' is printed)

This commit is contained in:
2025-07-24 22:20:47 +02:00
parent bb69efcc37
commit 6cfb1b6f5f

View File

@@ -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]