Browse Source

Fix resize down

close https://github.com/HaxeFoundation/hashlink/issues/479
Nicolas Cannasse 3 years ago
parent
commit
9fafef8f5a
1 changed files with 1 additions and 1 deletions
  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) {
 		if (length < len) {
 			__expand(len - 1);
 			__expand(len - 1);
 		} else if (length > len) {
 		} else if (length > len) {
-			for (i in length...len) {
+			for (i in len...length) {
 				array[i] = null;
 				array[i] = null;
 			}
 			}
 			this.length = len;
 			this.length = len;