diff options
author | Zac Pullar-Strecker <zacps@users.noreply.github.com> | 2018-11-25 10:08:02 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-25 10:08:02 +1300 |
commit | 742a6b48a196cabf65354862548c07d057a28d55 (patch) | |
tree | fb9846aa3880eec27627b3ac91535d963390e947 /src/term/mod.rs | |
parent | 0d47cd25b90deecc2dbf40c8361d2310049fdde7 (diff) | |
download | alacritty-742a6b48a196cabf65354862548c07d057a28d55.tar.gz alacritty-742a6b48a196cabf65354862548c07d057a28d55.zip |
Fix for an underflow on some type conversions (#1715)
Diffstat (limited to 'src/term/mod.rs')
-rw-r--r-- | src/term/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 5107dc2d..193d7188 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -865,8 +865,8 @@ impl SizeInfo { let line = Line(y.saturating_sub(self.padding_y as usize) / (self.cell_height as usize)); Point { - line: min(line, self.lines() - 1), - col: min(col, self.cols() - 1) + line: min(line, Line(self.lines().saturating_sub(1))), + col: min(col, Column(self.cols().saturating_sub(1))) } } } |