diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index 1d5e6512a..037692531 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -1628,6 +1628,7 @@ __SVFSCANF_R (struct _reent *rptr, && zeroes == 1) { flags |= HEXFLT; + flags &= ~NDIGITS; /* We skipped the first zero, so we have to add it now to the buffer. */ *p++ = '0';