aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/vfscanf.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 15:13:47 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 15:13:47 +0000
commite010bc493e9677320f313dcf4ebdb714b823d524 (patch)
tree54d399198cf595a3395809f119abea8aaeec5a82 /stdio-common/vfscanf.c
parent843c2a7ac5f04ba481706a5304b8c7d6d96a6461 (diff)
downloadglibc-e010bc493e9677320f313dcf4ebdb714b823d524.tar
glibc-e010bc493e9677320f313dcf4ebdb714b823d524.tar.gz
glibc-e010bc493e9677320f313dcf4ebdb714b823d524.tar.bz2
glibc-e010bc493e9677320f313dcf4ebdb714b823d524.zip
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.
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r--stdio-common/vfscanf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 1ea9bc4e07..a1e92768f4 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -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: