util.iterators: Don't replace var, as we should preserve var from the original iterat...
authorMatthew Wild <mwild1@gmail.com>
Thu, 10 Mar 2016 17:48:53 +0000 (17:48 +0000)
committerMatthew Wild <mwild1@gmail.com>
Thu, 10 Mar 2016 17:48:53 +0000 (17:48 +0000)
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