mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
_vsnprintf doesn't like a null pointer in windows
This commit is contained in:
parent
227491d929
commit
b3d6875e61
1 changed files with 4 additions and 0 deletions
|
@ -202,6 +202,10 @@ dvsprintf (dstring_t *dstr, const char *fmt, va_list args)
|
||||||
VA_COPY (tmp_args, args);
|
VA_COPY (tmp_args, args);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!dstr->truesize) {
|
||||||
|
dstr->size = 1024;
|
||||||
|
dstring_adjust (dstr);
|
||||||
|
}
|
||||||
size = vsnprintf (dstr->str, dstr->truesize, fmt, args) + 1; // +1 for nul
|
size = vsnprintf (dstr->str, dstr->truesize, fmt, args) + 1; // +1 for nul
|
||||||
while (size <= 0 || size > dstr->truesize) {
|
while (size <= 0 || size > dstr->truesize) {
|
||||||
if (size > 0)
|
if (size > 0)
|
||||||
|
|
Loading…
Reference in a new issue