diff options
author | worktycho <work.tycho@gmail.com> | 2015-11-24 22:15:13 +0100 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2015-11-24 22:15:13 +0100 |
commit | 5f2c226e1a202470f86c3e742e16c5351c5a17b5 (patch) | |
tree | 9e686ba2c86db345d9c89498d500a687b26e6e82 /src/Protocol | |
parent | Merge pull request #2688 from bendl/master (diff) | |
parent | fix escaped characters in signs (fixes #1736, fixes #2170) (diff) | |
download | cuberite-5f2c226e1a202470f86c3e742e16c5351c5a17b5.tar cuberite-5f2c226e1a202470f86c3e742e16c5351c5a17b5.tar.gz cuberite-5f2c226e1a202470f86c3e742e16c5351c5a17b5.tar.bz2 cuberite-5f2c226e1a202470f86c3e742e16c5351c5a17b5.tar.lz cuberite-5f2c226e1a202470f86c3e742e16c5351c5a17b5.tar.xz cuberite-5f2c226e1a202470f86c3e742e16c5351c5a17b5.tar.zst cuberite-5f2c226e1a202470f86c3e742e16c5351c5a17b5.zip |
Diffstat (limited to 'src/Protocol')
-rw-r--r-- | src/Protocol/Protocol18x.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp index 17b4dc6fd..373269509 100644 --- a/src/Protocol/Protocol18x.cpp +++ b/src/Protocol/Protocol18x.cpp @@ -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]); |