From 0ec573ff77dbd64fecdf3597d4bdaa19dfd57276 Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Wed, 4 Dec 2024 14:21:35 +0100 Subject: [PATCH] avm2: Make getCharBoundaries() return null for 0-width characters --- core/src/avm2/globals/flash/text/text_field.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/avm2/globals/flash/text/text_field.rs b/core/src/avm2/globals/flash/text/text_field.rs index d91905534c1c..2e884a775294 100644 --- a/core/src/avm2/globals/flash/text/text_field.rs +++ b/core/src/avm2/globals/flash/text/text_field.rs @@ -1635,6 +1635,10 @@ pub fn get_char_boundaries<'gc>( return Ok(Value::Null); }; + if bounds.width() == swf::Twips::ZERO { + return Ok(Value::Null); + } + let rect = activation .avm2() .classes()