Skip to content

Commit

Permalink
Fix a potential overflow with a saturating add.
Browse files Browse the repository at this point in the history
Fixes #575
  • Loading branch information
cjordan authored and djc committed Aug 11, 2023
1 parent 27c8399 commit cee6fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/multi.rs
Expand Up @@ -241,7 +241,7 @@ impl MultiState {
.unwrap_or_default();

// Track the total number of zombie lines on the screen
self.zombie_lines_count += line_count;
self.zombie_lines_count = self.zombie_lines_count.saturating_add(line_count);

// Make `DrawTarget` forget about the zombie lines so that they aren't cleared on next draw.
self.draw_target
Expand Down

0 comments on commit cee6fd4

Please sign in to comment.