oops, forgot the ~. fixes wildcode's lockup and should fix rxr's

This commit is contained in:
Bill Currie 2004-01-12 06:38:59 +00:00
parent 34f98e5a88
commit 15870757e4

View file

@ -296,8 +296,9 @@ _dvsprintf (dstring_t *dstr, int offs, const char *fmt, va_list args)
if (!dstr->truesize) if (!dstr->truesize)
dstring_clearstr (dstr); // Make it a string dstring_clearstr (dstr); // Make it a string
// Some vsnprintf implementations return -1 on truncation // Some vsnprintf implementations return -1 on truncation
while ((size = vsnprintf (dstr->str + offs, dstr->truesize - offs, fmt, args)) == -1) { while ((size = vsnprintf (dstr->str + offs, dstr->truesize - offs, fmt,
dstr->size = (dstr->truesize & 1023) + 1024; args)) == -1) {
dstr->size = (dstr->truesize & ~1023) + 1024;
dstring_adjust (dstr); dstring_adjust (dstr);
#ifdef VA_LIST_IS_ARRAY #ifdef VA_LIST_IS_ARRAY
VA_COPY (args, tmp_args); VA_COPY (args, tmp_args);