common/Message.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 962edaafd2807f5f3a5819b5b87b147f876280f9 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Mon Jun 15 19:56:59 2020 +0530 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Tue Jun 16 11:35:35 2020 +0200 jsonString: allow json messages without white-spaces after '{' The json generated by boost::property_tree::write_json() has no white-spaces around { , : } json-characters. We use write_json() extensively in core.git. Without this patch we will need work-arounds like inserting spaces in the json strings thus generated to work with online's Message::jsonString() Change-Id: I0f0631088f4a8b727301bde449884e03163093f0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96383 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> (cherry picked from commit bc7a0b262664032769b2dde3a31151f23ffd5235) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96417 diff --git a/common/Message.hpp b/common/Message.hpp index cb27e2c97..7bbadd172 100644 --- a/common/Message.hpp +++ b/common/Message.hpp @@ -97,7 +97,7 @@ public: /// Returns the json part of the message, if any. std::string jsonString() const { - if (_tokens.size() > 1 && _tokens[1] == "{") + if (_tokens.size() > 1 && _tokens[1].size() && _tokens[1][0] == '{') { const size_t firstTokenSize = _tokens[0].size(); return std::string(_data.data() + firstTokenSize, _data.size() - firstTokenSize); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits