X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b13fa4448f517b46e917c5145050f434d6df24d5..109def22c819619b72bd95e777605d04b81ac78d:/client/pm3_binlib.c?ds=sidebyside diff --git a/client/pm3_binlib.c b/client/pm3_binlib.c index 5c1e3cfc..88cb289f 100644 --- a/client/pm3_binlib.c +++ b/client/pm3_binlib.c @@ -107,7 +107,7 @@ 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 = (int)luaL_optint(L,(3),(1))-1; unsigned int i; if (i_read >= 0) { i = i_read;