GL: fixed printing error

This commit is contained in:
Martin Pulec
2019-06-04 10:24:02 +02:00
parent fe1e4c8d1d
commit 8c04528fa0

View File

@@ -1023,7 +1023,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);