Browse Source

Added CL_CLL to all message categories (#5895)

This makes sure that every possible leftover of any console messages that contained \r are correctly removed when using a category based show message call.
Lemongrass3110 4 years ago
parent
commit
704bf33649
1 changed files with 8 additions and 8 deletions
  1. 8 8
      src/common/showmsg.cpp

+ 8 - 8
src/common/showmsg.cpp

@@ -728,28 +728,28 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
 		case MSG_NONE: // direct printf replacement
 		case MSG_NONE: // direct printf replacement
 			break;
 			break;
 		case MSG_STATUS: //Bright Green (To inform about good things)
 		case MSG_STATUS: //Bright Green (To inform about good things)
-			strcat(prefix,CL_GREEN "[Status]" CL_RESET ":");
+			strcat(prefix,CL_GREEN "[Status]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		case MSG_SQL: //Bright Violet (For dumping out anything related with SQL) <- Actually, this is mostly used for SQL errors with the database, as successes can as well just be anything else... [Skotlex]
 		case MSG_SQL: //Bright Violet (For dumping out anything related with SQL) <- Actually, this is mostly used for SQL errors with the database, as successes can as well just be anything else... [Skotlex]
-			strcat(prefix,CL_MAGENTA "[SQL]" CL_RESET ":");
+			strcat(prefix,CL_MAGENTA "[SQL]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		case MSG_INFORMATION: //Bright White (Variable information)
 		case MSG_INFORMATION: //Bright White (Variable information)
-			strcat(prefix,CL_WHITE "[Info]" CL_RESET ":");
+			strcat(prefix,CL_WHITE "[Info]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		case MSG_NOTICE: //Bright White (Less than a warning)
 		case MSG_NOTICE: //Bright White (Less than a warning)
-			strcat(prefix,CL_WHITE "[Notice]" CL_RESET ":");
+			strcat(prefix,CL_WHITE "[Notice]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		case MSG_WARNING: //Bright Yellow
 		case MSG_WARNING: //Bright Yellow
-			strcat(prefix,CL_YELLOW "[Warning]" CL_RESET ":");
+			strcat(prefix,CL_YELLOW "[Warning]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		case MSG_DEBUG: //Bright Cyan, important stuff!
 		case MSG_DEBUG: //Bright Cyan, important stuff!
-			strcat(prefix,CL_CYAN "[Debug]" CL_RESET ":");
+			strcat(prefix,CL_CYAN "[Debug]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		case MSG_ERROR: //Bright Red  (Regular errors)
 		case MSG_ERROR: //Bright Red  (Regular errors)
-			strcat(prefix,CL_RED "[Error]" CL_RESET ":");
+			strcat(prefix,CL_RED "[Error]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		case MSG_FATALERROR: //Bright Red (Fatal errors, abort(); if possible)
 		case MSG_FATALERROR: //Bright Red (Fatal errors, abort(); if possible)
-			strcat(prefix,CL_RED "[Fatal Error]" CL_RESET ":");
+			strcat(prefix,CL_RED "[Fatal Error]" CL_RESET ":" CL_CLL);
 			break;
 			break;
 		default:
 		default:
 			ShowError("In function _vShowMessage() -> Invalid flag passed.\n");
 			ShowError("In function _vShowMessage() -> Invalid flag passed.\n");