mirror of
https://github.com/glest/glest-source.git
synced 2025-09-26 07:28:59 +02:00
Fixed the following nasty bugs:
- memory corruption when mouse click happens because there are more than 3 possible values for mouse button click - Recursive crash when outputting string representation of unitRef.
This commit is contained in:
@@ -265,12 +265,12 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
|
||||
printf("Opening logfile [%s] type = %d, currentDebugLog.fileStreamOwner = %d\n",debugLog.c_str(),type, currentDebugLog.fileStreamOwner);
|
||||
|
||||
currentDebugLog.mutex->p();
|
||||
MutexSafeWrapper safeMutex(currentDebugLog.mutex);
|
||||
|
||||
(*currentDebugLog.fileStream) << "Starting Mega-Glest logging for type: " << type << "\n";
|
||||
(*currentDebugLog.fileStream).flush();
|
||||
|
||||
currentDebugLog.mutex->v();
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
|
||||
//printf("Logfile is open [%s]\n",SystemFlags::debugLogFile);
|
||||
@@ -279,12 +279,12 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
|
||||
assert(currentDebugLog.fileStream != NULL);
|
||||
|
||||
currentDebugLog.mutex->p();
|
||||
MutexSafeWrapper safeMutex(currentDebugLog.mutex);
|
||||
|
||||
(*currentDebugLog.fileStream) << "[" << szBuf2 << "] " << szBuf;
|
||||
(*currentDebugLog.fileStream).flush();
|
||||
|
||||
currentDebugLog.mutex->v();
|
||||
safeMutex.ReleaseLock();
|
||||
}
|
||||
// output to console
|
||||
else {
|
||||
|
Reference in New Issue
Block a user