]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2007-04-27 Ulrich Drepper <drepper@redhat.com>
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 15:13:47 +0000 (15:13 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 15:13:47 +0000 (15:13 +0000)
[BZ #4342]
* stdio-common/vfscanf.c (_IO_vfscanf_internal): Allow
hexa-decimal floats without exponent.
* stdio-common/tstscanf.c (main): Adjust Test 8 test for success.

ChangeLog
stdio-common/tstscanf.c
stdio-common/vfscanf.c

index e5c57854a14f2a2d080eca1863e7e4d2db2cf7c0..8ae7d29660bd3212eb47c9e4408ab623d8803253 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-04-27  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #4342]
+       * stdio-common/vfscanf.c (_IO_vfscanf_internal): Allow
+       hexa-decimal floats without exponent.
+       * stdio-common/tstscanf.c (main): Adjust Test 8 test for success.
+
 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #3213]
index 44ddf49e15af856e1fc4f3e59205ec025afd4a6d..e8ca17be79e170a03a0d9ba78957cec98b179cf6 100644 (file)
@@ -272,7 +272,7 @@ main (int argc, char **argv)
     res = sscanf ("0x1234", "%lf", &d);
     printf ("res = %d, d = %f\n", res, d);
 
-    if (res != 0 || d != 123456.789)
+    if (res != 1 || d != 4660)
       {
        fputs ("test failed!\n", stdout);
        result = 1;
index 1ea9bc4e07d4273862daf22d4ccfe36cf28e3914..a1e92768f4f94b753c376d7c98d12363aa8b2a24 100644 (file)
@@ -1888,9 +1888,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
 
          /* Have we read any character?  If we try to read a number
             in hexadecimal notation and we have read only the `0x'
-            prefix or no exponent this is an error.  */
-         if (__builtin_expect (wpsize == 0
-                               || (is_hexa && (wpsize == 2 || ! got_e)), 0))
+            prefix this is an error.  */
+         if (__builtin_expect (wpsize == 0 || (is_hexa && wpsize == 2), 0))
            conv_error ();
 
        scan_float: