Permalink
Browse files

Use result of vsnprintf

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Nov 29, 2014
1 parent db6cabd commit 84a6f4155659f97d42290494bd21d51f55eda258
Showing with 2 additions and 1 deletion.
  1. +2 −1 qtools/qcstring.cpp
View
@@ -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;
}

0 comments on commit 84a6f41

Please sign in to comment.