summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-07-06 11:59:33 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-07-06 11:59:33 +0000
commite4d6b6be1f71fd5c8b02ef10d4c130fb5673b76e (patch)
tree91ed4da15f0166180801c5dec0e4373dd2eb7ffe /plugins/MirLua
parentf9d8f02dee0cf5f18f14d3471bf1159c519e9323 (diff)
MirLua: blob is not string
git-svn-id: http://svn.miranda-ng.org/main/trunk@14497 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/m_database.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp
index 3ab2fe48da..93dfc41238 100644
--- a/plugins/MirLua/src/m_database.cpp
+++ b/plugins/MirLua/src/m_database.cpp
@@ -98,8 +98,17 @@ static int lua_GetEvent(lua_State *L)
lua_pushstring(L, "Type");
lua_pushinteger(L, dbei.eventType);
lua_settable(L, -3);
- lua_pushstring(L, "Text");
- lua_pushlstring(L, (const char*)dbei.pBlob, dbei.cbBlob);
+ lua_pushstring(L, "Length");
+ lua_pushnumber(L, dbei.cbBlob);
+ lua_settable(L, -3);
+ lua_pushstring(L, "Blob");
+ lua_newtable(L);
+ for (DWORD i = 0; i < dbei.cbBlob; i++)
+ {
+ lua_pushinteger(L, i + 1);
+ lua_pushinteger(L, dbei.pBlob[i]);
+ lua_settable(L, -3);
+ }
lua_settable(L, -3);
mir_free(dbei.pBlob);