util.array: Small logic fix for array:filter()
authorMatthew Wild <mwild1@gmail.com>
Mon, 5 Oct 2009 17:39:28 +0000 (18:39 +0100)
committerMatthew Wild <mwild1@gmail.com>
Mon, 5 Oct 2009 17:39:28 +0000 (18:39 +0100)
util/array.lua

index bbf26f3214ae4992beda62004503641df6ca04d4..316a2861b6d46f327d643201880a574fde026ca5 100644 (file)
@@ -43,7 +43,7 @@ function array_base.filter(outa, ina, func)
                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