diff options
Diffstat (limited to 'gnu/lib/libdialog/msgbox.c')
| -rw-r--r-- | gnu/lib/libdialog/msgbox.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/lib/libdialog/msgbox.c b/gnu/lib/libdialog/msgbox.c index 50f6c13b2057..f8ca26fc5571 100644 --- a/gnu/lib/libdialog/msgbox.c +++ b/gnu/lib/libdialog/msgbox.c @@ -36,9 +36,11 @@ int dialog_msgbox(unsigned char *title, unsigned char *prompt, int height, int w height = strheight(prompt)+2+2*(!!pause); if (width < 0) { i = strwidth(prompt); - j = strwidth(title); + j = ((title != NULL) ? strwidth(title) : 0); width = MAX(i,j)+4; } + if (pause) + width = MAX(width,10); if (width > COLS) width = COLS; |
