|
Message-ID: <CA+yBz7Me6NNZ5arc+ztJAGmLQ79KxU9KKCvsNbejmpr=W=jnCw@mail.gmail.com>
Date: Thu, 7 Aug 2014 17:55:56 +0800
From: 林冠儒 <g548462@...il.com>
To: musl@...ts.openwall.com
Subject: fscanf question
I use libc-testsuite and test for fscanf function.
I found that the result is different from glibc.
In this case:
i = x = y = -1;
i = fscanf( "tmp.txt", "%5i%2i" , &x, &y)
printf(" i = %d, x = %d, y = %d" , i , x , y);
tmp.txt content >> "0x12 0x34"
In glibc, it will print >> "i = 2 , x = 18, y = 0"
In musl-libc will print >> "i = 1 , x = 18 , y = -1"
In this case, y's value should be "0x"
I wonder that "0x" is equal to "0" and should be counted as matched string
or not?
It would be very helpful if you email me back and tell me what's the problem
Sorry with my poor english!
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.