Use vsnprintf instead of vsprintf

This commit is contained in:
Crayon2000 2019-04-30 19:22:54 -04:00
parent 832e49adef
commit 4d02f245c3
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ void GRRLIB_GeckoPrintf (const char *text, ...) {
va_list argp; va_list argp;
va_start(argp, text); va_start(argp, text);
size = vsprintf(tmp, text, argp); size = vsnprintf(tmp, sizeof(tmp), text, argp);
va_end(argp); va_end(argp);
usb_sendbuffer_safe(1, tmp, size); usb_sendbuffer_safe(1, tmp, size);

View file

@ -78,7 +78,7 @@ void GRRLIB_PrintBMF (const f32 xpos, const f32 ypos,
va_list argp; va_list argp;
va_start(argp, text); va_start(argp, text);
size = vsprintf(tmp, text, argp); size = vsnprintf(tmp, sizeof(tmp), text, argp);
va_end(argp); va_end(argp);
for (i=0; i<size; i++) { for (i=0; i<size; i++) {