diff options
-rw-r--r-- | nuttx/libc/stdio/lib_sscanf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nuttx/libc/stdio/lib_sscanf.c b/nuttx/libc/stdio/lib_sscanf.c index 5c99ee47b..c1ad17323 100644 --- a/nuttx/libc/stdio/lib_sscanf.c +++ b/nuttx/libc/stdio/lib_sscanf.c @@ -699,6 +699,10 @@ int vsscanf(FAR char *buf, FAR const char *fmt, va_list ap) buf++; } } + else { + /* it is not a format specifier, and buf is empty. Stop matching */ + break; + } } /* Clean up - read whitespaces */ |