summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-11 17:07:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-11 17:07:04 +0300
commit8f9292d483fcf3a10d9284512359c4562f5311eb (patch)
tree3593ca1eb6a5a4c3b2ef454fa6b4944d4b8da8c4 /src/core/stdmsg
parent5f4f070347d20fc85b588138217aa744141e8053 (diff)
DB::FILE_BLOB - file events' access unification
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/msglog.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index c20b597beb..290c8ad77e 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -304,18 +304,16 @@ static bool CreateRTFFromDbEvent(LogStreamData *dat)
case EVENTTYPE_FILE:
{
- char *filename = (char*)dbei.pBlob + sizeof(uint32_t);
- char *descr = filename + mir_strlen(filename) + 1;
+ DB::FILE_BLOB blob(dbei);
SetToStyle(MSGFONTID_NOTICE, buf);
AppendToBufferWithRTF(buf, (dbei.flags & DBEF_SENT) ? TranslateT("File sent") : TranslateT("File received"));
buf.Append(": ");
- AppendToBufferWithRTF(buf, ptrW(DbEvent_GetString(&dbei, filename)));
+ AppendToBufferWithRTF(buf, blob.getName());
- if (*descr != 0) {
- ptrW ptszDescr(DbEvent_GetString(&dbei, descr));
+ if (*blob.getDescr() != 0) {
buf.Append(" (");
- AppendToBufferWithRTF(buf, ptszDescr);
+ AppendToBufferWithRTF(buf, blob.getDescr());
buf.Append(")");
}
}