From 734b02a734046474b0f7cd6e845a9ae14d932cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Voborsk=C3=BD?= Date: Thu, 22 Oct 2020 23:32:32 +0200 Subject: [PATCH] wiegand Lua 5.3 fix --- app/modules/wiegand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/wiegand.c b/app/modules/wiegand.c index 593cad37..60a8395f 100644 --- a/app/modules/wiegand.c +++ b/app/modules/wiegand.c @@ -184,7 +184,7 @@ static int lwiegand_create(lua_State* L) unsigned pinD1 = luaL_checkinteger(L, 2); luaL_argcheck(L, platform_gpio_exists(pinD0) && pinD0>0, 1, "Invalid pin for D0"); luaL_argcheck(L, platform_gpio_exists(pinD1) && pinD1>0 && pinD0 != pinD1, 2, "Invalid pin for D1"); - luaL_checkfunction(L, 3); + luaL_checktype(L, 3, LUA_TFUNCTION); if (pins_to_wiegand_state[pin_num[pinD0]] || pins_to_wiegand_state[pin_num[pinD1]]) return luaL_error(L, "pin already in use");