From: Thierry FOURNIER Date: Wed, 26 Aug 2015 12:19:03 +0000 (+0200) Subject: BUG/MINOR: lua: in some case a sample may remain undefined X-Git-Tag: v1.6-dev4~14 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=93405e1fded8c13e85ed3e606d798d4955f91222;p=haproxy.git 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. --- 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;