We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad553e9 commit 6220caeCopy full SHA for 6220cae
CHANGELOG.md
@@ -1,5 +1,7 @@
1
# unreleased
2
3
+- Fix memory allocation bug when terminal width is less than 10, see #244 (@selfup)
4
+
5
## Features
6
7
## Bugfixes
src/main.rs
@@ -362,7 +362,7 @@ fn run() -> Result<()> {
362
} else {
363
((8 / group_size) * (base_digits * group_size + 1)) + 2
364
};
365
- if (terminal_width - offset) / col_width < 1 {
+ if (terminal_width.saturating_sub(offset)) / col_width < 1 {
366
367
368
(terminal_width - offset) / col_width
0 commit comments