gallium: Pass 512 bytes max to EngDebugPrint.

This commit is contained in:
José Fonseca
2008-09-05 10:27:03 +09:00
parent 53979d0a35
commit 50524c2845

View File

@@ -76,7 +76,7 @@ void _debug_vprintf(const char *format, va_list ap)
/* EngDebugPrint does not handle float point arguments, so we need to use
* our own vsnprintf implementation. It is also very slow, so buffer until
* we find a newline. */
static char buf[512 + 1] = {'\0'};
static char buf[512] = {'\0'};
size_t len = strlen(buf);
int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) {