]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lua_mempool: Fix setting buckets of variables
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 2 May 2021 19:30:01 +0000 (20:30 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 2 May 2021 19:30:01 +0000 (20:30 +0100)
Reported by: Steve Sturges

src/lua/lua_mempool.c

index 5f1fe46b3635e0ba13a632d1f95d541bd621d3c3..356cf571f81e9c965707ae65db64e3f37c831a2e 100644 (file)
@@ -488,7 +488,7 @@ lua_mempool_get_variable (lua_State *L)
                                                        gdouble num;
                                                        memcpy (&num, pv, sizeof (num));
                                                        lua_pushnumber (L, num);
-                                                       lua_rawseti (L, -1, i + 1);
+                                                       lua_rawseti (L, -2, i + 1);
                                                        pv += sizeof (num);
                                                }
                                        }