X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_stringf.h;h=120c3269a2e8626a8c6af172d0e13ef61f5d263f;hb=4ba22fb51d97f1ecce04dcc5e40569a4354c1bae;hp=69627993cb45c9caffdaca59d415bd95af831399;hpb=cc91f4f6b469483cf8e01f8a0beec543ceed4bf6;p=synfig.git diff --git a/ETL/trunk/ETL/_stringf.h b/ETL/trunk/ETL/_stringf.h index 6962799..120c326 100644 --- a/ETL/trunk/ETL/_stringf.h +++ b/ETL/trunk/ETL/_stringf.h @@ -91,9 +91,12 @@ vstrprintf(const char *format, va_list args) #ifdef HAVE_VASPRINTF // This is the preferred method (and safest) char *buffer; std::string ret; - vasprintf(&buffer,format,args); - ret=buffer; - free(buffer); + int i=vasprintf(&buffer,format,args); + if (i>-1) + { + ret=buffer; + free(buffer); + } return ret; #else #ifdef HAVE_VSNPRINTF // This is the secondary method (Safe, but bulky)