Browse Source

Fix a minor bug in __crt_vstrprintf.

coderain 5 years ago
parent
commit
c22193bc7c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      crt/src/printf.c

+ 2 - 2
crt/src/printf.c

@@ -131,11 +131,11 @@ static inline int __crt_vstrprintf(__crt_stream_or_string_t *str, const char *fo
             }
             else if (*ptr == 'l')
             {
-                variable_size--;
+                variable_size++;
 
                 if (*++ptr == 'l')
                 {
-                    variable_size--;
+                    variable_size++;
                     ptr++;
                 }
             }