--- deliantra/server/common/utils.C 2009/10/12 14:00:57 1.89 +++ deliantra/server/common/utils.C 2009/10/15 21:09:32 1.90 @@ -614,16 +614,20 @@ return len; } -const char * -format (const char *format, ...) +char * +vformat (const char *format, va_list ap) { - static dynbuf_text buf; - - buf.clear (); + static dynbuf_text buf; buf.clear (); + buf.vprintf (format, ap); + return buf; +} +char * +format (const char *format, ...) +{ va_list ap; va_start (ap, format); - buf.vprintf (format, ap); + char *buf = vformat (format, ap); va_end (ap); return buf;