util.iterators: Don't replace var, as we should preserve var from the original iterat...
[prosody.git] / util / iterators.lua
index 868ba786a6ba7cfceb886d29e1ef7341d91eaccd..92f75189870538f149305e2860b180e43cf818c9 100644 (file)
@@ -154,7 +154,7 @@ end
 
 -- Convert the values returned by an iterator to an array
 function it.to_array(f, s, var)
-       local t, var = {};
+       local t = {};
        while true do
                var = f(s, var);
                if var == nil then break; end