diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dom/io/domstream.cpp | 9 | ||||
| -rw-r--r-- | src/dom/io/domstream.h | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/dom/io/domstream.cpp b/src/dom/io/domstream.cpp index 298a6df34..3ffba53fe 100644 --- a/src/dom/io/domstream.cpp +++ b/src/dom/io/domstream.cpp @@ -543,13 +543,10 @@ Writer &BasicWriter::printf(char *fmt, ...) va_list args; va_start(args, fmt); //replace this wish vsnprintf() - char buf[256]; - vsnprintf(buf, 255, fmt, args); + vsnprintf(formatBuf, 2047, fmt, args); va_end(args); - if (buf) { - writeString(buf); - //free(buf); - } + writeString(formatBuf); + return *this; } /** diff --git a/src/dom/io/domstream.h b/src/dom/io/domstream.h index 9904bb71b..05862f944 100644 --- a/src/dom/io/domstream.h +++ b/src/dom/io/domstream.h @@ -12,7 +12,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005 Bob Jamison + * Copyright (C) 2006 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -576,6 +576,10 @@ protected: BasicWriter() { destination = NULL; } + //Used for printf() or other things that might + //require formatting before sending down the stream + char formatBuf[2048]; + private: }; // class BasicWriter |
