diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-06-15 08:22:23 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-06-15 08:22:23 +0000 |
commit | 0a32217a1a246c5f05c7b492c2d34276ad95969f (patch) | |
tree | 6511838a79a79c54cb794643526b0a9750b37d10 /plugins | |
parent | bb3b1f898e5530e22fa8f48f786fca300cdd36d2 (diff) |
MirLua: fix previous commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@16976 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MirLua/src/m_database.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index f37182e210..b9318c1047 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -254,7 +254,6 @@ void MakeDbEvent(lua_State *L, DBEVENTINFO &dbei) lua_pop(L, 1);
lua_getfield(L, -1, "Blob");
-
switch (lua_type(L, -1))
{
case LUA_TTABLE:
@@ -658,12 +657,16 @@ int MT<DBEVENTINFO>::Index(lua_State *L, DBEVENTINFO *dbei) if (mir_strcmpi(key, "Blob") == 0)
{
lua_createtable(L, dbei->cbBlob, 0);
- for (int i = 0; i < dbei->cbBlob; i++)
+ for (DWORD i = 0; i < dbei->cbBlob; i++)
{
lua_pushinteger(L, dbei->pBlob[i]);
lua_rawseti(L, -2, i + 1);
}
}
+ else
+ lua_pushnil(L);
+
+ return 1;
}
void MT<DBEVENTINFO>::Free(lua_State*, DBEVENTINFO **dbei)
|