X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/645dbd491c48a1558fe16b99c3e4410459dd1852..9cb5a01c092b01a09480b3937a871445806852c7:/agedu.c diff --git a/agedu.c b/agedu.c index 5b836e7..9ff6bb8 100644 --- a/agedu.c +++ b/agedu.c @@ -949,7 +949,9 @@ int main(int argc, char **argv) ctx->progress = progress; { struct winsize ws; - if (progress && ioctl(2, TIOCGWINSZ, &ws) == 0) + if (progress && + ioctl(2, TIOCGWINSZ, &ws) == 0 && + ws.ws_col > 0) ctx->progwidth = ws.ws_col - 1; else ctx->progwidth = 79;