@@ -87,7 +87,7 @@ extern unsigned long int strtoul(const char* str, char** endptr, int base);
8787 * - c (char)
8888 * - s (null-terminated string)
8989 * - % (literal percent sign)
90- * - qualifiers: l, ll, z
90+ * - qualifiers: l, ll, z, width, (non-string) precision, left-space-pad, zero-pad
9191 *
9292 * Does not support:
9393 *
@@ -99,7 +99,7 @@ extern unsigned long int strtoul(const char* str, char** endptr, int base);
9999 * - f (decimal floating point)
100100 * - g (the shorter of %e and %f)
101101 * - G (the shorter of %E and %f)
102- * - qualifiers: L, width, (non-string) precision, -, +, space-pad, zero -pad, etc
102+ * - qualifiers: L, -, +, right -pad, etc
103103 *
104104 * @param str the output buffer to write to
105105 * @param size the size of the output buffer
@@ -153,7 +153,7 @@ int vsnprintf(
153153 }
154154 else if ( is_long == 2 )
155155 {
156- // Render %lu
156+ // Render %llu
157157 ll = va_arg ( ap , unsigned long long );
158158 }
159159 else if ( is_long == 1 )
@@ -212,7 +212,7 @@ int vsnprintf(
212212 signed long long ll = 0 ;
213213 if ( is_long == 2 )
214214 {
215- // Render %ld
215+ // Render %lld
216216 ll = va_arg ( ap , signed long long );
217217 }
218218 else if ( is_long == 1 )
@@ -440,7 +440,7 @@ static void write_padding(char* restrict str, size_t size, size_t* written, size
440440 {
441441 zero_pad_len = pad_len ;
442442 }
443- // Apply whilespace padding if needed
443+ // Apply whitespace padding if needed
444444 pad_len = (zero_pad_len > pad_len ) ? 0 : pad_len - zero_pad_len ;
445445 for (unsigned long i = 0 ; i < pad_len ; i ++ )
446446 {
0 commit comments