GL: fixed printing error

This commit is contained in:
Martin Pulec
2019-06-04 10:24:02 +02:00
parent d8bc463178
commit 1486a20558

View File

@@ -1003,7 +1003,7 @@ static void glut_init_error_callback(const char *fmt, va_list ap)
// format the string
auto buffer = (char *) alloca(size + 1);
va_copy(aq, ap);
if (vsprintf(buffer, fmt, ap) == size) {
if (vsprintf(buffer, fmt, ap) >= 0) {
LOG(LOG_LEVEL_ERROR) << "[GL] " << buffer << "\n";
}
va_end(aq);