From e43fc3243b73490d57093bcd62834292aae504f8 Mon Sep 17 00:00:00 2001 From: Adam David Date: Mon, 22 May 1995 13:32:29 +0000 Subject: [PATCH] eliminate coredump for readline(NULL) case --- gnu/lib/libreadline/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/lib/libreadline/display.c b/gnu/lib/libreadline/display.c index 66ddc435448..07fc909e2f4 100644 --- a/gnu/lib/libreadline/display.c +++ b/gnu/lib/libreadline/display.c @@ -746,7 +746,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) escape sequences (like drawing the `unbold' sequence without a corresponding `bold') that manifests itself on certain terminals. */ - lendiff = strlen (local_prompt); + lendiff = local_prompt ? strlen (local_prompt) : 0; if (current_line == 0 && !_rl_horizontal_scroll_mode && lendiff > visible_length && _rl_last_c_pos > 0 && (ofd - old) >= lendiff && term_cr)