msvcrt: scanf fix a typo
kumbayo84 at arcor.de
Sat Sep 20 09:26:54 CDT 2008
On Samstag 20 September 2008, Paul Vriens wrote:
> James Hawkins wrote:
> > On Fri, Sep 19, 2008 at 4:59 PM, Austin English <austinenglish at gmail.com> wrote:
> >> Relevant code:
> >> /* check %p with no hex digits */
> >> ok( sscanf("1233", "%p", &ptr) == 1, "sscanf failed\n" );
> >> ok( ptr == (void *)0x1233,"sscanf reads %p instead of %x\n", ptr, 0x1233 );
> >> ok( sscanf("1234", "%P", &ptr) == 1, "sscanf failed\n" );
> >> ok( ptr == (void *)0x1234,"sscanf reads %p instead of %x\n", ptr, 0x1234 );
> >> Comment reads %p. All the other chars are lower case, and you can see
> >> the values are different (1233 vs 1234).
> > I'm still positive the original author meant to use capital P.
> > There's no point in adding yet another test for a number that is
> > different by one digit.
> I have to agree with James here. The original author (Peter Oberndorfer)
> added the tests and an implementation of %p and %P.
It was my intention to test lower and upper case %p.
I used different number to make sure this is the result of the current scanf call
not from another call above with the same expected result.
adding ptr = (void*)0xdeadbeef; before each test would have been more explicit.
More information about the wine-devel