diff options
| author | 2024-01-11 08:32:30 +0100 | |
|---|---|---|
| committer | 2024-01-11 08:32:30 +0100 | |
| commit | 3d88ceb482855549271fe73165eeea4871222048 (patch) | |
| tree | 98e75e5a8eddccc3fbc64953f019c8d1be9a80ec /graphics | |
| parent | 9c50a7ed7ee439b658f406da9018c9249ffa0b81 (diff) | |
| download | iced-3d88ceb482855549271fe73165eeea4871222048.tar.gz iced-3d88ceb482855549271fe73165eeea4871222048.tar.bz2 iced-3d88ceb482855549271fe73165eeea4871222048.zip  | |
Avoid division by zero in `grapheme_position`
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/src/text/paragraph.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/src/text/paragraph.rs b/graphics/src/text/paragraph.rs index 56cd8868..5d027542 100644 --- a/graphics/src/text/paragraph.rs +++ b/graphics/src/text/paragraph.rs @@ -219,7 +219,7 @@ impl core::text::Paragraph for Paragraph {              glyph.w                  * (1.0                      - graphemes_seen.saturating_sub(index) as f32 -                        / last_grapheme_count as f32) +                        / last_grapheme_count.max(1) as f32)          };          Some(Point::new(  | 
