1
0
Fork 0

Merge pull request #2687 from Gargaj/signfix

Fix escaped characters in signs
This commit is contained in:
worktycho 2015-11-24 21:15:13 +00:00
commit 5f2c226e1a
1 changed files with 6 additions and 1 deletions

View File

@ -2530,10 +2530,15 @@ void cProtocol180::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
}
AString Lines[4];
Json::Value root;
Json::Reader reader;
for (int i = 0; i < 4; i++)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Line);
Lines[i] = Line.substr(1, Line.length() - 2); // Remove ""
if (reader.parse(Line, root, false))
{
Lines[i] = root.asString();
}
}
m_Client->HandleUpdateSign(BlockX, BlockY, BlockZ, Lines[0], Lines[1], Lines[2], Lines[3]);