Skip to content

Commit

Permalink
avm2: Make getCharBoundaries() return null for 0-width characters
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh committed Dec 12, 2024
1 parent 49ee3b3 commit 0ec573f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/avm2/globals/flash/text/text_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0ec573f

Please sign in to comment.