Skip to content

Commit

Permalink
Prevent underflow of new drive percent
Browse files Browse the repository at this point in the history
  • Loading branch information
ALSchwalm committed Oct 24, 2018
1 parent 0c800e3 commit cc07786
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pISO/src/newdrive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ impl input::Input for DriveSize {
Ok((true, vec![]))
}
action::Action::DecDriveSize => {
self.current_percent -= self.config.ui.size_step;
if self.current_percent - self.config.ui.size_step > 0.0 {
self.current_percent -= self.config.ui.size_step;
}
Ok((true, vec![]))
}
action::Action::OpenFormatMenu => {
Expand Down

0 comments on commit cc07786

Please sign in to comment.