diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1994-11-18 22:49:09 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1994-11-18 22:49:09 +0000 |
| commit | 852ffa19778edf9aa30aa27d22b1f31ad0c94377 (patch) | |
| tree | 4db83f865d0f5ad4fba44d77b8115e235a3ec60e /gnu/lib/libdialog/msgbox.c | |
| parent | 053efb2d1218885dee0fd90a9fe293d077f60c52 (diff) | |
Notes
Diffstat (limited to 'gnu/lib/libdialog/msgbox.c')
| -rw-r--r-- | gnu/lib/libdialog/msgbox.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/msgbox.c b/gnu/lib/libdialog/msgbox.c index fda3b40641a9..50f6c13b2057 100644 --- a/gnu/lib/libdialog/msgbox.c +++ b/gnu/lib/libdialog/msgbox.c @@ -40,6 +40,10 @@ int dialog_msgbox(unsigned char *title, unsigned char *prompt, int height, int w width = MAX(i,j)+4; } + if (width > COLS) + width = COLS; + if (height > LINES) + height = LINES; /* center dialog box on screen */ x = (COLS - width)/2; y = (LINES - height)/2; |
