summaryrefslogtreecommitdiff
path: root/plugins/Import/src/textjson.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-08-19 19:13:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-08-19 19:13:37 +0300
commit7caad1d40b0a161b62a59ed252ca6a40d0a73633 (patch)
tree3c01cfda423304e938c1c8d866cde3a7bf967ea2 /plugins/Import/src/textjson.cpp
parent22196f3cad4751f964c56da518bb57ab0e64ae97 (diff)
related to #1490: fix for eating last char in a message
Diffstat (limited to 'plugins/Import/src/textjson.cpp')
-rw-r--r--plugins/Import/src/textjson.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp
index 0b7a0616a3..250884e945 100644
--- a/plugins/Import/src/textjson.cpp
+++ b/plugins/Import/src/textjson.cpp
@@ -139,8 +139,8 @@ public:
std::string szBody = (*node)["body"].as_string();
if (!szBody.empty()) {
dbei->flags |= DBEF_UTF;
- dbei->cbBlob = (DWORD)szBody.size();
- dbei->pBlob = (PBYTE)mir_alloc(szBody.size() + 1);
+ dbei->cbBlob = (DWORD)szBody.size()+1;
+ dbei->pBlob = (PBYTE)mir_alloc(dbei->cbBlob);
strcpy((char*)dbei->pBlob, szBody.c_str());
}