Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r--newlib/libc/stdio/vfscanf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
index 76561fe4a..f13181af7 100644
--- a/newlib/libc/stdio/vfscanf.c
+++ b/newlib/libc/stdio/vfscanf.c
@@ -765,6 +765,7 @@ _DEFUN(__svfscanf_r, (rptr, fp, fmt0, ap),
{
/* scan an integer as if by strtol/strtoul */
unsigned width_left = 0;
+ int skips = 0;
#ifdef hardway
if (width == 0 || width > sizeof (buf) - 1)
#else
@@ -813,6 +814,7 @@ _DEFUN(__svfscanf_r, (rptr, fp, fmt0, ap),
width_left--;
width++;
}
+ ++skips;
goto skip;
/* 1 through 7 always legal */
@@ -957,7 +959,7 @@ _DEFUN(__svfscanf_r, (rptr, fp, fmt0, ap),
}
nassigned++;
}
- nread += p - buf;
+ nread += p - buf + skips;
break;
}
#ifdef FLOATING_POINT