summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-26 14:26:57 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-26 14:26:57 +0000
commit2812c8a2415168365a0d354a0e8a3e9536316668 (patch)
tree309711f5bab440a46fbd14770fc654ec7d4bb25e /src/lua
parentfcf8994d52e8ffd6b46e2e2a54e308cf600d9155 (diff)
downloadrspamd-2812c8a2415168365a0d354a0e8a3e9536316668.tar.gz
rspamd-2812c8a2415168365a0d354a0e8a3e9536316668.zip
Fix ratelimit plugin.
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_redis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c
index e2b19f8ee..2d27fd6e1 100644
--- a/src/lua/lua_redis.c
+++ b/src/lua/lua_redis.c
@@ -260,10 +260,10 @@ lua_redis_make_request (lua_State *L)
args = g_alloca ((top + 1) * sizeof (gchar *));
lua_pushnil (L);
args[0] = cmd;
- top = 0;
+ top = 1;
while (lua_next (L, -2) != 0) {
- args[++top] = lua_tostring (L, -1);
+ args[top++] = lua_tostring (L, -1);
lua_pop (L, 1);
}