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
1 changed files with 3 additions and 2 deletions

View File

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