summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_metatable.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-04-24 13:13:31 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-04-24 13:13:31 +0000
commit0080cd035eaa00062b5f0f494be1e8862d8548b7 (patch)
treefabf8dda506c5637328f03770f676e152cfd64c7 /plugins/MirLua/src/mlua_metatable.h
parent79812b0325d58e7954d4aec16aa8dddfec9c5479 (diff)
MirLua: fixed CONTACTINFO metatable
git-svn-id: http://svn.miranda-ng.org/main/trunk@16760 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_metatable.h')
-rw-r--r--plugins/MirLua/src/mlua_metatable.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h
index 0946eb9caa..13c2d614e3 100644
--- a/plugins/MirLua/src/mlua_metatable.h
+++ b/plugins/MirLua/src/mlua_metatable.h
@@ -106,8 +106,7 @@ private:
auto it = fields.find(key);
if (it == fields.end())
{
- lua_pushnil(L);
- return 1;
+ return Index(L, obj);
}
MTField<T> *field = it->second;
@@ -136,7 +135,7 @@ private:
lua_pushlightuserdata(L, field->GetValue<void*>(obj));
break;
default:
- return Index(L, obj);
+ lua_pushnil(L);
}
return 1;