summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog/prgbox.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-11-18 22:49:09 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-11-18 22:49:09 +0000
commit852ffa19778edf9aa30aa27d22b1f31ad0c94377 (patch)
tree4db83f865d0f5ad4fba44d77b8115e235a3ec60e /gnu/lib/libdialog/prgbox.c
parent053efb2d1218885dee0fd90a9fe293d077f60c52 (diff)
Notes
Diffstat (limited to 'gnu/lib/libdialog/prgbox.c')
-rw-r--r--gnu/lib/libdialog/prgbox.c4
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;