Commit 119a58e3 authored by Dino Bollinger's avatar Dino Bollinger Committed by Richard Gobeille
Browse files

Engine: Fix same error as in OSD_Printf() also in initprintf() and buildgl_outputDebugMessage()

parent c17cfbf4
......@@ -65,11 +65,10 @@ int initprintf(const char *f, ...)
va_list va;
buf = (char *)Xrealloc(buf, (size <<= 1));
va_start(va, f);
len = Bvsnprintf(buf, size-1, f, va);
len = Bvsnprintf(buf, size, f, va);
va_end(va);
} while ((unsigned)len > size-1);
} while ((unsigned)len >= size);
buf[len] = 0;
initputs(buf);
Xfree(buf);
......
......@@ -45,11 +45,10 @@ void buildgl_outputDebugMessage(uint8_t severity, const char* format, ...)
va_list va;
buf = (char *)Xrealloc(buf, (size <<= 1));
va_start(va, format);
len = Bvsnprintf(buf, size-1, format, va);
len = Bvsnprintf(buf, size, format, va);
va_end(va);
} while ((unsigned)len > size-1);
} while ((unsigned)len >= size);
buf[len] = 0;
glDebugMessageInsertARB(GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_OTHER_ARB,
0,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment