diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
commit | e96132b4d5344d2d58d247906bcaefccfb9d5253 (patch) | |
tree | 24a9524e4900547f2ba3a461e228fd3c98c0410d /plugins/MirOTR/src | |
parent | 4dac8bd56f9116ac76423b2664286ed894ca80c2 (diff) |
DBEVENTINFO::hContact to be returned inside an event, no need to call db_event_getContact() just after db_event_get()
Diffstat (limited to 'plugins/MirOTR/src')
-rw-r--r-- | plugins/MirOTR/src/dbfilter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/src/dbfilter.cpp index d6420f1cea..2b8d1869c1 100644 --- a/plugins/MirOTR/src/dbfilter.cpp +++ b/plugins/MirOTR/src/dbfilter.cpp @@ -97,8 +97,8 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam) buf.Append(msg + msgLen + 1, datalen); } - my_dbei.pBlob = (uint8_t*)buf.GetBuffer(); - my_dbei.cbBlob = (int)buf.GetLength(); + my_dbei.pBlob = buf.GetBuffer(); + my_dbei.cbBlob = buf.GetLength(); my_dbei.flags |= DBEF_OTR_PREFIXED; db_event_add(hContact, &my_dbei); @@ -115,7 +115,7 @@ int OnDatabaseEventAdded(WPARAM hContact, LPARAM lParam) DBEVENTINFO info = {}; info.cbBlob = len * 2; - info.pBlob = (uint8_t*)_alloca(info.cbBlob); + info.pBlob = (char *)_alloca(info.cbBlob); if (db_event_get(lParam, &info)) return 0; |