From c7d7fd0ddc68b444831f8cce7ff66f1cbe68c2d0 Mon Sep 17 00:00:00 2001 From: jarca0123 <11705208+jarca0123@users.noreply.github.com> Date: Sat, 20 Apr 2024 20:56:48 +0200 Subject: [PATCH] oops --- core/src/avm2/array.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/avm2/array.rs b/core/src/avm2/array.rs index 9c499cab19fc6..fa69388c7271d 100644 --- a/core/src/avm2/array.rs +++ b/core/src/avm2/array.rs @@ -316,8 +316,8 @@ impl<'gc> ArrayStorage<'gc> { /// Convert the array to a dense representation if it meets the criteria. fn maybe_convert_to_dense(&mut self) { - if let ArrayStorage::Sparse { length, .. } = self { - if *length < MIN_SPARSE_LENGTH { + if let ArrayStorage::Sparse { storage, length } = self { + if storage.is_empty() && *length == 0 { *self = ArrayStorage::Dense { storage: Vec::new(), occupied_count: 0,