Permalink
Browse files

Fixed bug in new QCString::sprintf for long string.

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Nov 16, 2014
1 parent d13908f commit 0ec56b7aa2dd39e3cab71c2229d486161566e7f6
Showing with 4 additions and 3 deletions.
  1. +3 −2 qtools/qcstring.cpp
  2. +1 −1 src/diagram.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;
@@ -1337,7 +1337,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
epsBaseName.data(),epsBaseName.data());
//printf("Converting eps using `%s'\n",epstopdfCmd.data());
//printf("Converting eps using `%s'\n",epstopdfArgs.data());
portable_sysTimerStart();
if (portable_system("epstopdf",epstopdfArgs)!=0)
{

0 comments on commit 0ec56b7

Please sign in to comment.