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