Fix #9940: Print debuglevel parse errors to console when changed from console

This commit is contained in:
Niels Martin Hansen
2022-08-26 12:08:47 +02:00
parent dcdc8d187c
commit c6953f13e4
4 changed files with 8 additions and 6 deletions

View File

@@ -1587,7 +1587,7 @@ DEF_CONSOLE_CMD(ConDebugLevel)
if (argc == 1) {
IConsolePrint(CC_DEFAULT, "Current debug-level: '{}'", GetDebugString());
} else {
SetDebugString(argv[1]);
SetDebugString(argv[1], [](const char *err) { IConsolePrint(CC_ERROR, std::string(err)); });
}
return true;