Fix a typo from 2000 BC
This commit is contained in:
parent
14b52dbb51
commit
0218ff618c
@ -623,17 +623,10 @@ namespace Components
|
|||||||
std::hash<ServerInfo> hashFn;
|
std::hash<ServerInfo> hashFn;
|
||||||
server.hash = hashFn(server);
|
server.hash = hashFn(server);
|
||||||
|
|
||||||
#if false
|
|
||||||
// more secure
|
// more secure
|
||||||
server.hostname = TextRenderer::StripMaterialTextIcons(server.hostname);
|
server.hostname = TextRenderer::StripMaterialTextIcons(server.hostname);
|
||||||
#else
|
|
||||||
// more fun !
|
|
||||||
constexpr auto MAX_SERVER_NAME_LENGTH = 48;
|
|
||||||
server.hostname = server.hostname.substr(0, MAX_SERVER_NAME_LENGTH);
|
|
||||||
|
|
||||||
#endif
|
if (server.hostname.empty() || std::all_of(server.hostname.begin(), server.hostname.end(), isspace))
|
||||||
const auto strippedHostName = TextRenderer::StripMaterialTextIcons(server.hostname);
|
|
||||||
if (server.hostname.empty() || strippedHostName.empty() || std::all_of(strippedHostName.begin(), strippedHostName.end(), isspace))
|
|
||||||
{
|
{
|
||||||
// Invalid server name containing only emojis
|
// Invalid server name containing only emojis
|
||||||
return;
|
return;
|
||||||
|
@ -1414,7 +1414,7 @@ namespace Components
|
|||||||
std::string TextRenderer::StripMaterialTextIcons(const std::string& in)
|
std::string TextRenderer::StripMaterialTextIcons(const std::string& in)
|
||||||
{
|
{
|
||||||
char buffer[1000]{}; // Should be more than enough
|
char buffer[1000]{}; // Should be more than enough
|
||||||
StripAllTextIcons(in.data(), buffer, sizeof(buffer));
|
StripMaterialTextIcons(in.data(), buffer, sizeof(buffer));
|
||||||
return std::string{ buffer };
|
return std::string{ buffer };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user