summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2020-04-25 19:18:15 +0300
committerMataes <mataes2007@gmail.com>2020-04-25 19:18:46 +0300
commit61e9808175dd39d9ff2ba39d26f13194584c8242 (patch)
tree010059303bfd5ff343f8865e1d72c0fa2633b9ad /plugins/NewStory/src
parent21c9f2d5e82fc4c54f367051caec6d627624d770 (diff)
newstory: fix for export
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r--plugins/NewStory/src/history.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp
index 3dde394cc6..c22b1c3eb6 100644
--- a/plugins/NewStory/src/history.cpp
+++ b/plugins/NewStory/src/history.cpp
@@ -697,30 +697,30 @@ public:
SetFilePointer(hFile, -3, nullptr, FILE_END);
WriteFile(hFile, ",", 1, &dwBytesWritten, nullptr);
}
-
- pRoot.push_back(JSONNode("type", dbei.eventType));
+ JSONNode pRoot2;
+ pRoot2.push_back(JSONNode("type", dbei.eventType));
if (mir_strcmp(dbei.szModule, proto))
- pRoot.push_back(JSONNode("module", dbei.szModule));
+ pRoot2.push_back(JSONNode("module", dbei.szModule));
- pRoot.push_back(JSONNode("timestamp", dbei.timestamp));
+ pRoot2.push_back(JSONNode("timestamp", dbei.timestamp));
wchar_t szTemp[500];
TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, dbei.timestamp, L"I", szTemp, _countof(szTemp), 0);
- pRoot.push_back(JSONNode("isotime", T2Utf(szTemp).get()));
+ pRoot2.push_back(JSONNode("isotime", T2Utf(szTemp).get()));
std::string flags;
if (dbei.flags & DBEF_SENT)
flags += "m";
if (dbei.flags & DBEF_READ)
flags += "r";
- pRoot.push_back(JSONNode("flags", flags));
+ pRoot2.push_back(JSONNode("flags", flags));
ptrW msg(DbEvent_GetTextW(&dbei, CP_ACP));
if (msg)
- pRoot.push_back(JSONNode("body", T2Utf(msg).get()));
+ pRoot2.push_back(JSONNode("body", T2Utf(msg).get()));
- output = pRoot.write_formatted();
+ output = pRoot2.write_formatted();
output += "\n]}";
WriteFile(hFile, output.c_str(), (int)output.size(), &dwBytesWritten, nullptr);