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

Engine: Fix edge case where OSD_Printf() may wrongly remove the last char in a string

parent b2e15923
......@@ -1686,11 +1686,9 @@ int OSD_Printf(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);
} while ((unsigned)len > size-1);
buf[len] = 0;
} while ((unsigned)len >= size);
Supports Markdown
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