mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 23:19:07 +02:00
-added another mutex release to fix a bug found from a segfault
-added a safer debug buffer output method -added ability to specify precsion for floating point conversion
This commit is contained in:
@@ -195,8 +195,9 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
va_list argList;
|
||||
va_start(argList, fmt);
|
||||
|
||||
char szBuf[4096]="";
|
||||
vsprintf(szBuf,fmt, argList);
|
||||
const int max_debug_buffer_size = 8096;
|
||||
char szBuf[max_debug_buffer_size]="";
|
||||
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
|
||||
|
||||
// Either output to a logfile or
|
||||
if(currentDebugLog.debugLogFileName != "") {
|
||||
|
Reference in New Issue
Block a user