mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-22 02:00:40 +00:00
Zero buffer in wgtprintf properly
This commit is contained in:
parent
1d0e1717b3
commit
6be60a6de4
1 changed files with 5 additions and 1 deletions
|
@ -428,12 +428,16 @@ number:
|
|||
void
|
||||
wgtprintf (short x, short y, wgtfont font, const char *fmt, ...)
|
||||
{
|
||||
char *buffer = malloc(250); /* Buffer to build string into*/
|
||||
memset(buffer, 0, 250);
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
char buffer[251]; /* Buffer to build string into*/
|
||||
kvprintf(fmt, NULL, (void *)buffer, 10, ap);
|
||||
wouttextxy (x, y, font, buffer);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
free(buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue