Skip to content

Uninitialized local variable in terminal_size#92

Merged
p-ranav merged 1 commit intop-ranav:masterfrom
turuslan:fix/terminal_size
Mar 18, 2021
Merged

Uninitialized local variable in terminal_size#92
p-ranav merged 1 commit intop-ranav:masterfrom
turuslan:fix/terminal_size

Conversation

@turuslan
Copy link
Contributor

On MacOS ioctl doesn't fill size structure for non-tty fd.
In such case terminal_size returns random value from stack.

P.S. I found this when I used ProgressBar with option::Completed{terminal_width() == 0} to add newlines when stdout is piped.

@p-ranav p-ranav merged commit 91ceb5c into p-ranav:master Mar 18, 2021
@turuslan turuslan deleted the fix/terminal_size branch March 18, 2021 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants