# HG changeset patch # User Matthew Wild # Date 1457632133 0 # Node ID 425bc672d60b14dff61e839b185c714e5ac0b0d7 # Parent 8aaae816cc7ec7983ab9fcc7270829336e8a9639 util.iterators: Don't replace var, as we should preserve var from the original iterator [luacheck] diff -r 8aaae816cc7e -r 425bc672d60b util/iterators.lua --- a/util/iterators.lua Wed Mar 09 12:59:43 2016 +0000 +++ b/util/iterators.lua Thu Mar 10 17:48:53 2016 +0000 @@ -154,7 +154,7 @@ -- 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