Lua 5.1 compatibility

This commit is contained in:
Hisham
2016-06-20 20:40:01 -03:00
parent 2e068eb438
commit a1015fe395

View File

@@ -866,7 +866,8 @@ static int push_link_target(lua_State *L) {
if (lua_type(L, -1) == LUA_TTABLE) { if (lua_type(L, -1) == LUA_TTABLE) {
/* when symlinkattributes collects the whole table, /* when symlinkattributes collects the whole table,
get the size from it */ get the size from it */
int size_type = lua_getfield(L, -1, "size"); lua_getfield(L, -1, "size");
int size_type = lua_type(L, -1);
if (size_type != LUA_TNUMBER) { if (size_type != LUA_TNUMBER) {
lua_pop(L, 1); lua_pop(L, 1);
errno = EINVAL; errno = EINVAL;