summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-06-05 17:50:34 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-06-05 17:50:34 +0300
commitd7c9eb34f80f207efd47d2fc65e31aedf166c323 (patch)
tree338b9b905674dc31b1efab739dfcedeed3d8d7b3 /plugins/MirLua
parentffc5a3d7550528281976745279e77ac9faba551b (diff)
major code cleaning in regard to db_event_getBlobSize & event memory allocation
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/Modules/m_database.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/MirLua/src/Modules/m_database.cpp b/plugins/MirLua/src/Modules/m_database.cpp
index f00887a7da..538f7682a3 100644
--- a/plugins/MirLua/src/Modules/m_database.cpp
+++ b/plugins/MirLua/src/Modules/m_database.cpp
@@ -636,11 +636,9 @@ DBEVENTINFO* MT<DBEVENTINFO>::Init(lua_State *L)
{
MEVENT hDbEvent = luaL_checkinteger(L, 1);
- DBEVENTINFO* dbei = (DBEVENTINFO*)mir_calloc(sizeof(DBEVENTINFO));
- dbei->cbBlob = db_event_getBlobSize((MEVENT)hDbEvent);
- dbei->pBlob = (PBYTE)mir_calloc(dbei->cbBlob);
+ DBEVENTINFO *dbei = (DBEVENTINFO *)mir_calloc(sizeof(DBEVENTINFO));
+ dbei->cbBlob = -1;
db_event_get((MEVENT)hDbEvent, dbei);
-
return dbei;
}