From 8d73fb5699ded4eed7139652ba1bc8ff98a46a78 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Wed, 15 Jan 2014 23:51:17 -0800 Subject: [PATCH] fix(library/hop_match): Lua bindings gotcha See http://www.luafaq.org/gotchas.html#T6.4 Signed-off-by: Leonardo de Moura --- src/library/hop_match.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/hop_match.cpp b/src/library/hop_match.cpp index 449355a481..f35551d946 100644 --- a/src/library/hop_match.cpp +++ b/src/library/hop_match.cpp @@ -261,7 +261,7 @@ static int hop_match(lua_State * L) { if (s) { push_expr(L, *s); } else { - lua_pushnil(L); + lua_pushboolean(L, false); } lua_rawseti(L, -2, i); i = i + 1;