From 1df4df6d8a7742fd0aeae347d4683cea495325e1 Mon Sep 17 00:00:00 2001 From: tisf Date: Fri, 20 Oct 2017 21:55:13 +0700 Subject: [PATCH] Fixing liblua issues On MacOS might have issues with compilation. This should fix it in a case where liblua used is not the built in one. --- client/pm3_binlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/pm3_binlib.c b/client/pm3_binlib.c index 5c1e3cfc..ed46c8e8 100644 --- a/client/pm3_binlib.c +++ b/client/pm3_binlib.c @@ -107,7 +107,8 @@ static int l_unpack(lua_State *L) /** unpack(f,s, [init]) */ size_t len; const char *s=luaL_checklstring(L,2,&len); /* switched s and f */ const char *f=luaL_checkstring(L,1); - int i_read = luaL_optint(L,3,1)-1; + int i_read = luaL_optinteger(L,3,1)-1; + // int i_read = luaL_optint(L,3,1)-1; unsigned int i; if (i_read >= 0) { i = i_read; @@ -347,4 +348,3 @@ int set_bin_library (lua_State *L) { lua_pop(L, 1); return 1; } - -- 2.39.2