[PATCH] ucrtbase: Later printf width specifiers should override earlier ones

Andrew Eikum aeikum at codeweavers.com
Mon Nov 8 09:44:25 CST 2021


Thanks, David. I've resent the patches squashed together and with the
added ucrtbase tests.

Andrew

On Mon, Nov 08, 2021 at 07:06:26PM +0800, David Gow wrote:
> In ucrtbase (but not in msvcrt), when a printf format specifier has two
> width specifiers (both a '*' and an explicit number), only the latter
> should take effect. (In msvcrt, the width of one is combined with the
> other).
> 
> This patch builds on the prior patch which implements the msvcrt
> behaviour, and needs to be applied on top of it:
> msvcrt: The '*' character should be interpreted as the beginning of the width specification[1,2]
> 
> It also supercedes the previous (incorrect) patch which used the
> ucrtbase behaviour on msvcrt as well:
> msvcrt: printf: Later width specifiers should override earlier ones[3]
> 
> For further details, see [4], [5], and [6].
> 
> [1]: https://source.winehq.org/patches/data/218904
> [2]: https://www.winehq.org/pipermail/wine-devel/2021-November/200009.html
> [3]: https://www.winehq.org/pipermail/wine-devel/2021-November/200040.html
> [4]: https://www.winehq.org/pipermail/wine-devel/2021-November/200039.html
> [5]: https://github.com/ValveSoftware/Proton/issues/5258#issuecomment-962423092
> [6]: https://www.winehq.org/pipermail/wine-devel/2021-November/200063.html
> 
> Signed-off-by: David Gow <david at davidgow.net>



More information about the wine-devel mailing list