mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Update.
1999-08-13 Ulrich Drepper <drepper@cygnus.com> * stdio-common/tstscanf.c: Add test for hexadecimal float parsing problem.
This commit is contained in:
@@ -250,5 +250,20 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
fputs ("Test 8:\n", stdout);
|
||||
{
|
||||
double d = 123456.789;
|
||||
int res;
|
||||
|
||||
res = sscanf ("0x1234", "%lf", &d);
|
||||
printf ("res = %d, d = %f\n", res, d);
|
||||
|
||||
if (res != 0 || d != 123456.789)
|
||||
{
|
||||
fputs ("test failed!\n", stdout);
|
||||
result = 1;
|
||||
}
|
||||
}
|
||||
|
||||
exit (result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user