Fix bug in internal_printf

This commit is contained in:
apio 2022-09-07 15:02:38 +02:00
parent e936a143d3
commit aa6c578a3c

View File

@ -50,7 +50,7 @@ static int internal_printf(const char* format, PutString put_string_callback, ss
char current_char = format[format_index]; char current_char = format[format_index];
if (current_char == '%' || preserve_format) if (current_char == '%' || preserve_format)
{ {
if (format_index + 1 == format_size) // end of format string if (!preserve_format && format_index + 1 == format_size) // end of format string
{ {
format_index++; format_index++;
continue; continue;