From 1d7c537cb1106f8daf36a6bbd69ecd377b542b39 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Tue, 22 Aug 2017 18:19:36 +0200 Subject: Fixed Lua Table to Json parsing Signed-off-by: Sebastien Douheret --- Controller-afb/ctl-lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller-afb/ctl-lua.c b/Controller-afb/ctl-lua.c index ce631dc..8d5a87e 100644 --- a/Controller-afb/ctl-lua.c +++ b/Controller-afb/ctl-lua.c @@ -199,8 +199,8 @@ STATIC json_object *LuaTableToJson (lua_State* luaState, int index) { if (!tableJ) { tableJ= json_object_new_array(); tableType=LUA_TNUMBER; - } else if(tableType == LUA_TNUMBER) { - AFB_ERROR("MIX Lua Table with key string/numeric not supported"); + } else if(tableType != LUA_TNUMBER) { + AFB_ERROR("MIX Lua Table with key numeric/string not supported"); return NULL; } -- cgit 1.2.3-korg