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.
This commit is contained in:
Thierry FOURNIER 2015-08-26 14:19:03 +02:00 committed by Willy Tarreau
parent 0d79cf686b
commit 93405e1fde

View File

@ -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;