summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
Diffstat (limited to '')
-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]);