diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-11-29 15:53:34 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-11-29 15:53:34 (GMT) |
commit | 84a6f4155659f97d42290494bd21d51f55eda258 (patch) | |
tree | 48a1292668d95e18c3639439699b1b566f8bfa67 /qtools | |
parent | db6cabd07bb4c4b854542570cef96dac48484e0a (diff) | |
download | Doxygen-84a6f4155659f97d42290494bd21d51f55eda258.zip Doxygen-84a6f4155659f97d42290494bd21d51f55eda258.tar.gz Doxygen-84a6f4155659f97d42290494bd21d51f55eda258.tar.bz2 |
Use result of vsnprintf
Diffstat (limited to 'qtools')
-rw-r--r-- | qtools/qcstring.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp index 1eb24aa..fdd9971 100644 --- a/qtools/qcstring.cpp +++ b/qtools/qcstring.cpp @@ -32,7 +32,8 @@ QCString &QCString::sprintf( const char *format, ... ) int l = length(); if (l<minlen) { resize(minlen); l=minlen; } int n=vsnprintf( data(), l, format, ap); - resize(qstrlen(data())+1); + if (n<0) n=l; + resize(n+1); va_end( ap ); return *this; } |