Codechange: Use EncodedString for error messages. (#13569)

This commit is contained in:
2025-02-16 10:04:32 +00:00
committed by GitHub
parent 43c7865ca2
commit 2d7d085e8e
55 changed files with 426 additions and 390 deletions

View File

@@ -302,7 +302,7 @@ uint NetworkCalculateLag(const NetworkClientSocket *cs)
void ShowNetworkError(StringID error_string)
{
_switch_mode = SM_MENU;
ShowErrorMessage(error_string, INVALID_STRING_ID, WL_CRITICAL);
ShowErrorMessage(GetEncodedString(error_string), {}, WL_CRITICAL);
}
/**
@@ -862,7 +862,7 @@ bool NetworkValidateServerName(std::string &server_name)
StrTrimInPlace(server_name);
if (!server_name.empty()) return true;
ShowErrorMessage(STR_NETWORK_ERROR_BAD_SERVER_NAME, INVALID_STRING_ID, WL_ERROR);
ShowErrorMessage(GetEncodedString(STR_NETWORK_ERROR_BAD_SERVER_NAME), {}, WL_ERROR);
return false;
}