Fix a minor bug in __crt_vstrprintf.
authorcoderain <coderain@sdf.org>
Sat, 1 Sep 2018 21:18:52 +0000 (23:18 +0200)
committercoderain <coderain@sdf.org>
Sat, 1 Sep 2018 21:18:52 +0000 (23:18 +0200)
crt/src/printf.c

index c7fae78dcb31ed5b4788ed801de3f8c75bb636d2..4a320aaba39cb74e2ead83587fb86a872c89f8b4 100644 (file)
@@ -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++;
                 }
             }