diff options
Diffstat (limited to 'gnu/lib/libdialog/prgbox.c')
| -rw-r--r-- | gnu/lib/libdialog/prgbox.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/prgbox.c b/gnu/lib/libdialog/prgbox.c index 0145389d4000..53275bfd704e 100644 --- a/gnu/lib/libdialog/prgbox.c +++ b/gnu/lib/libdialog/prgbox.c @@ -39,6 +39,10 @@ int dialog_prgbox(unsigned char *title, const unsigned char *line, int height, i fprintf(stderr, "\nAutosizing is impossible in dialog_prgbox().\n"); exit(-1); } + if (width > COLS) + width = COLS; + if (height > LINES) + height = LINES; /* center dialog box on screen */ x = (COLS - width)/2; y = (LINES - height)/2; |
