Fix some minor bugs in EscapeTag/UnescapeTag.

This commit is contained in:
Sadie Powell 2024-07-29 18:37:04 +01:00
parent a5503a9f5e
commit 6d956cbed6

View File

@ -80,7 +80,7 @@ std::string ClientProtocol::Message::EscapeTag(const std::string& value)
ret.append("\\s");
break;
case ';':
ret.append("\\;");
ret.append("\\:");
break;
case '\\':
ret.append("\\\\");
@ -113,8 +113,9 @@ std::string ClientProtocol::Message::UnescapeTag(const std::string& value)
}
it++;
if (it != value.end())
{
if (it == value.end())
break;
chr = *it;
switch (chr)
{
@ -138,11 +139,9 @@ std::string ClientProtocol::Message::UnescapeTag(const std::string& value)
break;
}
}
}
return ret;
}
const ClientProtocol::SerializedMessage& ClientProtocol::Message::GetSerialized(const SerializedInfo& serializeinfo) const
{
// First check if the serialized line they're asking for is in the cache