]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] tbl append -> rawset()
authorMikhail Galanin <mgalanin@mimecast.com>
Fri, 21 Sep 2018 14:59:44 +0000 (15:59 +0100)
committerMikhail Galanin <mgalanin@mimecast.com>
Fri, 21 Sep 2018 14:59:44 +0000 (15:59 +0100)
lualib/lua_selectors.lua

index 15bf9e312a2f784f586977807f22e38fca78195e..10de40fff2acf8ca08f69a8b89b6dc7238e0ee92 100644 (file)
@@ -898,13 +898,13 @@ exports.combine_selectors = function(_, selectors, delimiter)
     local res = {}
 
     local in_prefix = true
-    for _,s in ipairs(selectors) do
+    for i,s in ipairs(selectors) do
       if type(s) == 'string' then
-        tbl[#tbl + 1] = fun.duplicate(s)
+        rawset(tbl, i, fun.duplicate(s))
       elseif type(s) == 'userdata' then
-        tbl[#tbl + 1] = fun.duplicate(tostring(s))
+        rawset(tbl, i, fun.duplicate(tostring(s)))
       else
-        tbl[#tbl + 1] = s
+        rawset(tbl, i, s)
       end
     end