# HG changeset patch # User Adam Kaminski # Date 1608344116 18000 # Fri Dec 18 21:15:16 2020 -0500 # Node ID 043cc8c7ec642dd2a40a9b37c6aecac2fc2caedb # Parent 9960a244f371efb19c205e05ae542a4168768604 Fixed an old issue with clear color codes not reflecting the corresponding message level's color in the console afterwards. diff -r 9960a244f371 -r 043cc8c7ec64 src/c_console.cpp --- a/src/c_console.cpp Wed Dec 16 19:20:20 2020 -0500 +++ b/src/c_console.cpp Fri Dec 18 21:15:16 2020 -0500 @@ -849,6 +849,16 @@ } else if (*work_p != '\0') { + // [AK] A clear color code is used, so change the code + // back to the corresponding message level's color. + if (*work_p == '-') + { + *work_p = 'A' + (printlevel == PRINT_HIGH ? CR_TAN : + printlevel == 200 ? CR_GREEN : + printlevel < 0 ? CR_TAN : + printlevel < PRINTLEVELS ? PrintColors[printlevel] : + CR_TAN); + } cc = *work_p++; } continue;