]> pd.if.org Git - pdclib/blobdiff - functions/stdio/vsscanf.c
Intermediate debugging work on *scanf().
[pdclib] / functions / stdio / vsscanf.c
index f33b8c418e6e9d8a12d3cbcd2ee955f9b0c85ed9..fd35889ab4d200ead2782f2a1e732c9b76fc97a7 100644 (file)
@@ -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 */