]> pd.if.org Git - pdclib/blobdiff - functions/stdio/vfscanf.c
Proper handling of NULL return code.
[pdclib] / functions / stdio / vfscanf.c
index eda4226988d9c2b6222f624a613563331790accd..0667c990828f7757c124da7b5257faf42b4a47e9 100644 (file)
@@ -59,6 +59,11 @@ int vfscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict forma
         }
         else
         {
+            /* NULL return code indicates matching error */
+            if ( rc == NULL )
+            {
+                break;
+            }
             /* Continue parsing after conversion specifier */
             format = rc;
         }