From a1015fe3952e1216e3df16307189586046f83131 Mon Sep 17 00:00:00 2001 From: Hisham Date: Mon, 20 Jun 2016 20:40:01 -0300 Subject: Lua 5.1 compatibility --- src/lfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lfs.c b/src/lfs.c index 49a8534..64debb8 100644 --- a/src/lfs.c +++ b/src/lfs.c @@ -866,7 +866,8 @@ static int push_link_target(lua_State *L) { if (lua_type(L, -1) == LUA_TTABLE) { /* when symlinkattributes collects the whole table, 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) { lua_pop(L, 1); errno = EINVAL; -- cgit v1.2.3