Fix handling of "%z" in format strings in 64 bit MSVC builds
ChangeFmtChar(), used only to replace "%z" with "%I" when using MSVC, was buggy and forgot to increment the pointer to the next format character, meaning that the "I" we wanted to insert into the format string was simply lost, overwritten by the next character ("d", "u" or "x"). This actually didn't change anything in 32 bit builds, but it did result in not using the correct size in 64 bit ones, e.g. using "%zx" with (size_t)-1 output only "ffffffff" instead of the correct "ffffffffffffffff". See #17492.
This commit is contained in:
@@ -361,7 +361,7 @@ private:
|
||||
CopyAllBefore();
|
||||
}
|
||||
|
||||
*m_fmtLast = ch;
|
||||
*m_fmtLast++ = ch;
|
||||
}
|
||||
|
||||
void CopyAllBefore()
|
||||
|
Reference in New Issue
Block a user