summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog/inputbox.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1995-01-30 14:11:58 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1995-01-30 14:11:58 +0000
commit255ec70534cbcfc3acc5ca510233b09dc093e700 (patch)
tree8fef152ce7e55c355dc552942299c434c3426349 /gnu/lib/libdialog/inputbox.c
parent7cb18415b8a370eef92a029067988617b4eb84f3 (diff)
Notes
Diffstat (limited to 'gnu/lib/libdialog/inputbox.c')
-rw-r--r--gnu/lib/libdialog/inputbox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/lib/libdialog/inputbox.c b/gnu/lib/libdialog/inputbox.c
index 61dd2f21248f..b69267f1c950 100644
--- a/gnu/lib/libdialog/inputbox.c
+++ b/gnu/lib/libdialog/inputbox.c
@@ -37,9 +37,10 @@ int dialog_inputbox(unsigned char *title, unsigned char *prompt, int height, int
height = strheight(prompt)+2+4;
if (width < 0) {
i = strwidth(prompt);
- j = strwidth(title);
+ j = ((title != NULL) ? strwidth(title) : 0);
width = MAX(i,j) + 4;
}
+ width = MAX(width,24);
if (width > COLS)
width = COLS;