This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a2e9e83956961ae354b981d831d81a1bd768f432
Author: Xiang Xiao <[email protected]>
AuthorDate: Tue Mar 8 17:47:22 2022 +0800

    libc/stdio: Don't fetch width/prec modifier in parser phase
    
    Signed-off-by: Xiang Xiao <[email protected]>
---
 libs/libc/stdio/lib_libvsprintf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libs/libc/stdio/lib_libvsprintf.c 
b/libs/libc/stdio/lib_libvsprintf.c
index 7d449cb..c6a5c71 100644
--- a/libs/libc/stdio/lib_libvsprintf.c
+++ b/libs/libc/stdio/lib_libvsprintf.c
@@ -363,6 +363,10 @@ static int vsprintf_internal(FAR struct lib_outstream_s 
*stream,
                       flags |= FL_ASTERISK;
                       continue;
                     }
+                  else if (stream == NULL)
+                    {
+                      continue; /* We do only parsing */
+                    }
 #endif
 
                   if ((flags & FL_PREC) != 0)

Reply via email to