util.array: Small logic fix for array:filter()

Mon, 05 Oct 2009 18:39:28 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 05 Oct 2009 18:39:28 +0100
changeset 1922
d5fe0f9b377a
parent 1921
5ac99cd46545
child 1923
2d242334508d
child 1947
ff2b86076e9c

util.array: Small logic fix for array:filter()

util/array.lua file | annotate | diff | comparison | revisions
--- a/util/array.lua	Mon Oct 05 17:56:31 2009 +0100
+++ b/util/array.lua	Mon Oct 05 18:39:28 2009 +0100
@@ -43,7 +43,7 @@
 		end
 	end
 	
-	if inplace and write < start_length then
+	if inplace and write <= start_length then
 		for i=write,start_length do
 			outa[i] = nil;
 		end

mercurial