Changeset

4387:06161b0b83f2

util.array: Fix array.collect() for iterators that expect initial value of var to be preserved
author Matthew Wild <mwild1@gmail.com>
date Sun, 25 Sep 2011 00:21:22 +0100
parents 4386:ce769240f8ec
children 4388:eded80beab58
files util/array.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/array.lua	Sun Sep 25 00:20:43 2011 +0100
+++ b/util/array.lua	Sun Sep 25 00:21:22 2011 +0100
@@ -98,7 +98,7 @@
 
 --- These methods always create a new array
 function array.collect(f, s, var)
-	local t, var = {};
+	local t = {};
 	while true do
 		var = f(s, var);
 	        if var == nil then break; end