diff options
| author | Lua Team <team@lua.org> | 2015-06-03 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2015-06-03 12:00:00 +0000 |
| commit | 6ddf2b3ca86471f90439976967c9e608582f0d0b (patch) | |
| tree | 7fa563fe4062fcea38b86adfe8a26ac413f0d97b /src/lauxlib.c | |
| parent | 34c362812ab38172d3da36404ec9a85f929579c5 (diff) | |
| download | lua-github-5.3.1-rc1.tar.gz | |
Lua 5.3.1-rc15.3.1-rc1
Diffstat (limited to 'src/lauxlib.c')
| -rw-r--r-- | src/lauxlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lauxlib.c b/src/lauxlib.c index 1c41d6a8..b8bace7f 100644 --- a/src/lauxlib.c +++ b/src/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.279 2014/12/14 18:32:26 roberto Exp $ +** $Id: lauxlib.c,v 1.280 2015/02/03 17:38:24 roberto Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -286,7 +286,7 @@ LUALIB_API int luaL_execresult (lua_State *L, int stat) { */ LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) { - if (luaL_getmetatable(L, tname)) /* name already in use? */ + if (luaL_getmetatable(L, tname) != LUA_TNIL) /* name already in use? */ return 0; /* leave previous value on top, but return 0 */ lua_pop(L, 1); lua_newtable(L); /* create metatable */ |
