util.iterators: Don't replace var, as we should preserve var from the original iterator [luacheck]
authorMatthew Wild <mwild1@gmail.com>
Thu, 10 Mar 2016 17:48:53 +0000
changeset 7260 425bc672d60b
parent 7257 8aaae816cc7e
child 7261 b8f60dd8e99a
util.iterators: Don't replace var, as we should preserve var from the original iterator [luacheck]
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