mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:31 +00:00
This commit is contained in:
1 parent
ad553e9e33
commit
6220cae644
2 files changed
+3
-1
No files matched your search
@@ -1,5 +1,7 @@
|
||||
# unreleased
|
||||
|
||||
- Fix memory allocation bug when terminal width is less than 10, see #244 (@selfup)
|
||||
|
||||
## Features
|
||||
|
||||
## Bugfixes
|
||||
|
||||
+1
-1
@@ -362,7 +362,7 @@ fn run() -> Result<()> {
|
||||
} else {
|
||||
((8 / group_size) * (base_digits * group_size + 1)) + 2
|
||||
};
|
||||
if (terminal_width - offset) / col_width < 1 {
|
||||
if (terminal_width.saturating_sub(offset)) / col_width < 1 {
|
||||
1
|
||||
} else {
|
||||
(terminal_width - offset) / col_width
|
||||
|
||||
Reference in new issue
Block a user