diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1994-11-17 19:21:51 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1994-11-17 19:21:51 +0000 |
| commit | 04339572bc17c9ffdc05bed8cb0702ee402f7945 (patch) | |
| tree | 5b6a6d3d48d2b56881366e69324dd90d7c8d4521 /gnu/lib/libdialog/prgbox.c | |
| parent | 0cb06fc0095125fe674d3ed9f4dbb296da5f563d (diff) | |
Notes
Diffstat (limited to 'gnu/lib/libdialog/prgbox.c')
| -rw-r--r-- | gnu/lib/libdialog/prgbox.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/prgbox.c b/gnu/lib/libdialog/prgbox.c index 672609995542..0145389d4000 100644 --- a/gnu/lib/libdialog/prgbox.c +++ b/gnu/lib/libdialog/prgbox.c @@ -34,6 +34,11 @@ int dialog_prgbox(unsigned char *title, const unsigned char *line, int height, i FILE *f; unsigned char *s, buf[MAX_LEN]; + if (height < 0 || width < 0) { + endwin(); + fprintf(stderr, "\nAutosizing is impossible in dialog_prgbox().\n"); + exit(-1); + } /* center dialog box on screen */ x = (COLS - width)/2; y = (LINES - height)/2; |
