diff options
Diffstat (limited to 'newlib/libc/stdio/vfscanf.c')
-rw-r--r-- | newlib/libc/stdio/vfscanf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index e5bb345ec..5e92febed 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -872,6 +872,10 @@ _DEFUN(__svfscanf_r, (rptr, fp, fmt0, ap), { base = 16;/* if %i */ flags &= ~PFXOK; + /* We must reset the NZDIGITS and NDIGITS + flags that would have been unset by seeing + the zero that preceded the X or x. */ + flags |= NZDIGITS | NDIGITS; goto ok; } break; |