X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=functions%2Fstdio%2Fvsscanf.c;h=fd35889ab4d200ead2782f2a1e732c9b76fc97a7;hb=e14567d72c2767ba5684f155b2dfa5f2a9a33837;hp=f33b8c418e6e9d8a12d3cbcd2ee955f9b0c85ed9;hpb=3d4013ef75d2bc9da10cae34ee7ffb2004a83f82;p=fw%2Fpdclib diff --git a/functions/stdio/vsscanf.c b/functions/stdio/vsscanf.c index f33b8c4..fd35889 100644 --- a/functions/stdio/vsscanf.c +++ b/functions/stdio/vsscanf.c @@ -59,9 +59,14 @@ int vsscanf( const char * _PDCLIB_restrict s, const char * _PDCLIB_restrict form } else { - /* NULL return code indicates matching error */ + /* NULL return code indicates input error */ if ( rc == NULL ) { + if ( status.n == 0 ) + { + /* input error before any conversion returns EOF */ + status.n = EOF; + } break; } /* Continue parsing after conversion specifier */