diff options
author | adam <adam@FreeBSD.org> | 1995-05-22 13:32:29 +0000 |
---|---|---|
committer | adam <adam@FreeBSD.org> | 1995-05-22 13:32:29 +0000 |
commit | c88727cf79b89a2c8cf7994b7e00314b38b5679e (patch) | |
tree | 17b74854e3cce6c7106468d9c28e6a7a2d004327 /gnu | |
parent | cf998003ee86fb7b707872c6e8b3f7c74568ff0e (diff) | |
download | FreeBSD-src-c88727cf79b89a2c8cf7994b7e00314b38b5679e.zip FreeBSD-src-c88727cf79b89a2c8cf7994b7e00314b38b5679e.tar.gz |
eliminate coredump for readline(NULL) case
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/lib/libreadline/display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/lib/libreadline/display.c b/gnu/lib/libreadline/display.c index 66ddc43..07fc909 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) |