From 93405e1fded8c13e85ed3e606d798d4955f91222 Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Wed, 26 Aug 2015 14:19:03 +0200 Subject: [PATCH] BUG/MINOR: lua: in some case a sample may remain undefined When we transform a top stack entry in sample, the empty stack case is not handled. This patch fix this behavior. --- src/hlua.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hlua.c b/src/hlua.c index 5357b32fd..f7ce3a5c1 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -508,6 +508,8 @@ static int hlua_lua2smp(lua_State *L, int ud, struct sample *smp) case LUA_TFUNCTION: case LUA_TTHREAD: case LUA_TLIGHTUSERDATA: + case LUA_TNONE: + default: smp->data.type = SMP_T_BOOL; smp->data.u.sint = 0; break;