Jelajahi Sumber

Remove assertion when too long message attempted

Since these can be caused by malformed input files assert is the wrong thing.
Turo Lamminen 10 tahun lalu
induk
melakukan
9f9774403d
1 mengubah file dengan 0 tambahan dan 4 penghapusan
  1. 0 4
      code/DefaultLogger.cpp

+ 0 - 4
code/DefaultLogger.cpp

@@ -165,7 +165,6 @@ void Logger::debug(const char* message)	{
 	// sometimes importers will include data from the input file
 	// sometimes importers will include data from the input file
 	// (i.e. node names) in their messages.
 	// (i.e. node names) in their messages.
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
-		ai_assert(false);
 		return;
 		return;
 	}
 	}
 	return OnDebug(message);
 	return OnDebug(message);
@@ -176,7 +175,6 @@ void Logger::info(const char* message)	{
 	
 	
 	// SECURITY FIX: see above
 	// SECURITY FIX: see above
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
-		ai_assert(false);
 		return;
 		return;
 	}
 	}
 	return OnInfo(message);
 	return OnInfo(message);
@@ -187,7 +185,6 @@ void Logger::warn(const char* message)	{
 	
 	
 	// SECURITY FIX: see above
 	// SECURITY FIX: see above
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
-		ai_assert(false);
 		return;
 		return;
 	}
 	}
 	return OnWarn(message);
 	return OnWarn(message);
@@ -198,7 +195,6 @@ void Logger::error(const char* message)	{
 	
 	
 	// SECURITY FIX: see above
 	// SECURITY FIX: see above
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
-		ai_assert(false);
 		return;
 		return;
 	}
 	}
 	return OnError(message);
 	return OnError(message);