[PATCH] msvcrt: The '*' character should be interpreted as the beginning of the width specification

Andrew Eikum aeikum at codeweavers.com
Fri Nov 5 14:25:24 CDT 2021


On Fri, Nov 05, 2021 at 08:22:40PM +0100, Piotr Caban wrote:
> Hi Andrew,
> 
> On 11/5/21 19:49, Andrew Eikum wrote:
> > Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
> > ---
> > 
> > For example,
> > 
> >      "%*0d", 1, ...
> > 
> > becomes
> > 
> >      "%10d", ...
> > 
> > i.e. prints ten digits.
> It looks like a bug in native implementation. It also got fixed in newer
> versions of C runtime (I have only checked ucrtbase). Is there an
> application that depends on that?
> 

Yeah, newly released Age of Empires IV uses a format string like
"%0*02d" and crashes when Wine invokes the error handler.

Andrew



More information about the wine-devel mailing list