From ca2374d88c09759f2a46e68801e5eb557eee7d3b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 12 Aug 2016 11:20:28 +0100 Subject: [PATCH] [Fix] Fix returning of REDIS_NIL --- src/lua/lua_redis.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c index c35d9614b..1fc8e1777 100644 --- a/src/lua/lua_redis.c +++ b/src/lua/lua_redis.c @@ -271,8 +271,7 @@ lua_redis_push_reply (lua_State *L, const redisReply *r) lua_pushnumber (L, r->integer); break; case REDIS_REPLY_NIL: - /* XXX: not the best approach */ - lua_newuserdata (L, sizeof (gpointer)); + lua_pushnil (L); break; case REDIS_REPLY_STRING: case REDIS_REPLY_STATUS: -- 2.39.5