diff options
| author | Alexander Gavrilov | 2012-04-06 19:56:19 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-06 19:56:19 +0400 |
| commit | 0daafef690d6a9e44f7caa7f61b89a63a3870cf9 (patch) | |
| tree | f1e433a244965af860fbf125a497d018a5988e80 /library/LuaWrapper.cpp | |
| parent | 2640addf49d48092104b1ba14518895a5765359d (diff) | |
| download | dfhack-0daafef690d6a9e44f7caa7f61b89a63a3870cf9.tar.gz dfhack-0daafef690d6a9e44f7caa7f61b89a63a3870cf9.tar.bz2 dfhack-0daafef690d6a9e44f7caa7f61b89a63a3870cf9.tar.xz | |
Wrap MaterialInfo for lua.
Diffstat (limited to 'library/LuaWrapper.cpp')
| -rw-r--r-- | library/LuaWrapper.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/LuaWrapper.cpp b/library/LuaWrapper.cpp index 2f3958ef..1c3b61c1 100644 --- a/library/LuaWrapper.cpp +++ b/library/LuaWrapper.cpp @@ -699,6 +699,9 @@ static int meta_assign(lua_State *state) { type_identity *id = get_object_identity(state, 1, "df.assign()", false); + if (lua_getmetatable(state, 2)) + luaL_error(state, "cannot use lua tables with metatable in df.assign()"); + int base = lua_gettop(state); // x:assign{ assign = foo } => x:assign(foo) |
