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:
Vadim Zeitlin
2016-04-12 17:09:12 +02:00
parent d62c535d4c
commit 2f35bda171

View File

@@ -361,7 +361,7 @@ private:
CopyAllBefore();
}
*m_fmtLast = ch;
*m_fmtLast++ = ch;
}
void CopyAllBefore()