mirror of
https://github.com/glest/glest-source.git
synced 2025-10-04 03:11:53 +02:00
- lots more code cleanup, using safe buffer size code to avoid buffer overflows
This commit is contained in:
@@ -588,7 +588,7 @@ void Program::setState(ProgramState *programStateNew, bool cleanupOldState) {
|
||||
}
|
||||
catch(const exception &e){
|
||||
char szBuf[8096]="";
|
||||
sprintf(szBuf,"In [%s::%s Line: %d]\nError [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,e.what());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d]\nError [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,e.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,szBuf);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,szBuf);
|
||||
//abort();
|
||||
|
Reference in New Issue
Block a user