diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-11-16 13:57:04 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-11-16 13:57:04 (GMT) |
commit | 0ec56b7aa2dd39e3cab71c2229d486161566e7f6 (patch) | |
tree | 49974c9d385ac7e65ed7437e1a8e23272975c6c2 /qtools | |
parent | d13908f65b6e745bab14dc610c9f9bc7908c55c5 (diff) | |
download | Doxygen-0ec56b7aa2dd39e3cab71c2229d486161566e7f6.zip Doxygen-0ec56b7aa2dd39e3cab71c2229d486161566e7f6.tar.gz Doxygen-0ec56b7aa2dd39e3cab71c2229d486161566e7f6.tar.bz2 |
Fixed bug in new QCString::sprintf for long string.
Diffstat (limited to 'qtools')
-rw-r--r-- | qtools/qcstring.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp index 2f622df..1eb24aa 100644 --- a/qtools/qcstring.cpp +++ b/qtools/qcstring.cpp @@ -29,8 +29,9 @@ QCString &QCString::sprintf( const char *format, ... ) va_list ap; va_start( ap, format ); const int minlen=256; - if (length()<minlen) resize(minlen); - vsnprintf( data(), minlen, format, ap); + int l = length(); + if (l<minlen) { resize(minlen); l=minlen; } + int n=vsnprintf( data(), l, format, ap); resize(qstrlen(data())+1); va_end( ap ); return *this; |