printf: incorrectly printing specifier if padding length (>1 chars) defined with invalid specifier #5
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Take this example:
"He%0llo there"
would be printed asHe%0llo there
, as expected.However,
"He%00llo there"
would be printed asHe00llo there
.Longer padding lengths would print the same.
This makes sense because if padding length is 0 RDI is decreased by one (and when reaching invalid specifier, if padding length != 0 it is decreased by one). Then
word [rdi]
is written to buffer.This is a bit complicated because now I'll also have to store the string length of given padding, and then set rdi pointer accordingly.
Low prio. Just keeping this issue here in case I ever feel like fixing it.
This is not a prod project anyway, and it's simple; just use the function correctly (which I do). This is just an edge case that might be fix in the future (it's not that complicated to do, it's just a hazzle -- and again since it's not a production thing, low prio, not feeling like fixing it rn)