Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash for (really) small terminal sizes #117

Closed
sharkdp opened this issue May 14, 2018 · 0 comments
Closed

Crash for (really) small terminal sizes #117

sharkdp opened this issue May 14, 2018 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@sharkdp
Copy link
Owner

sharkdp commented May 14, 2018

If the terminal width is smaller than the size of the side-panel, bat crashes with

fatal runtime error: allocator memory exhausted
[1]    14199 illegal hardware instruction (core dumped)  bat README.md

Running in debug mode reveals the problematic code line:

thread 'main' panicked at 'attempt to subtract with overflow', src/printer.rs:153:32

let hline = "─".repeat(self.config.term_width - (PANEL_WIDTH + 1));

@sharkdp sharkdp added bug Something isn't working good first issue Good for newcomers labels May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant