mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Squashed bugs found by @mikekaganski; See #483
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ std::string format(const char* fmt, ...)
|
||||
va_start(vl,fmt);
|
||||
int nsize = vsnprintf(buffer,size,fmt,vl);
|
||||
if(size<=nsize){//fail delete buffer and try again
|
||||
delete buffer; buffer = 0;
|
||||
delete[] buffer; buffer = 0;
|
||||
buffer = new char[nsize+1];//+1 for /0
|
||||
nsize = vsnprintf(buffer,size,fmt,vl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user