Explorar o código

Fix resize down

close https://github.com/HaxeFoundation/hashlink/issues/479
Nicolas Cannasse %!s(int64=3) %!d(string=hai) anos
pai
achega
9fafef8f5a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      std/hl/types/ArrayObj.hx

+ 1 - 1
std/hl/types/ArrayObj.hx

@@ -317,7 +317,7 @@ class ArrayObj<T> extends ArrayBase {
 		if (length < len) {
 			__expand(len - 1);
 		} else if (length > len) {
-			for (i in length...len) {
+			for (i in len...length) {
 				array[i] = null;
 			}
 			this.length = len;