http://bugs.winehq.org/show_bug.cgi?id=35786
Bug ID: 35786 Summary: Incorrect behaviour in printf with 0 value on "%#x" Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: steve@sk2.org
Created attachment 47780 --> http://bugs.winehq.org/attachment.cgi?id=47780 Test case
Hi,
This is forwarded from http://bugs.debian.org/741592
The printf documentation states that "%#x" prepends 0x for non-zero values only, but the Wine implementation prefixes 0x for zero too:
$ cat t.c #include <stdio.h> int main() { int val = 0;/* zero */ fprintf(stdout, "value=%#x\n", val ); return 0; } $ i686-w64-mingw32-gcc t.c $ wine32 a.exe value=0x0
The resulting executable prints
value=0
when run on Windows.
Regards,
Stephen