forked from Bananymous/banan-os
LibC: Fix bug in *printf
This commit is contained in:
parent
812e61ca70
commit
5248a3fe48
|
@ -462,6 +462,10 @@ int vfprintf(FILE* file, const char* format, va_list arguments)
|
|||
switch (*format)
|
||||
{
|
||||
case '%':
|
||||
if (fputc('%', file) == EOF)
|
||||
return -1;
|
||||
written++;
|
||||
format++;
|
||||
break;
|
||||
case 's':
|
||||
{
|
||||
|
@ -476,11 +480,15 @@ int vfprintf(FILE* file, const char* format, va_list arguments)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fputc(*format, file) == EOF)
|
||||
return -1;
|
||||
written++;
|
||||
format++;
|
||||
}
|
||||
}
|
||||
|
||||
return written;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue