summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol18x.cpp
diff options
context:
space:
mode:
authorGargaj <gargaj@conspiracy.hu>2015-11-24 19:33:32 +0100
committerGargaj <gargaj@conspiracy.hu>2015-11-24 19:51:39 +0100
commit1fb89a540950e76f8f0f5ec08eceb5e41197910a (patch)
tree9e686ba2c86db345d9c89498d500a687b26e6e82 /src/Protocol/Protocol18x.cpp
parentMerge pull request #2688 from bendl/master (diff)
downloadcuberite-1fb89a540950e76f8f0f5ec08eceb5e41197910a.tar
cuberite-1fb89a540950e76f8f0f5ec08eceb5e41197910a.tar.gz
cuberite-1fb89a540950e76f8f0f5ec08eceb5e41197910a.tar.bz2
cuberite-1fb89a540950e76f8f0f5ec08eceb5e41197910a.tar.lz
cuberite-1fb89a540950e76f8f0f5ec08eceb5e41197910a.tar.xz
cuberite-1fb89a540950e76f8f0f5ec08eceb5e41197910a.tar.zst
cuberite-1fb89a540950e76f8f0f5ec08eceb5e41197910a.zip
Diffstat (limited to 'src/Protocol/Protocol18x.cpp')
-rw-r--r--src/Protocol/Protocol18x.cpp7
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]);