nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 4b6090ded3f772b79f573e0a9410161a3ddb58bc
parent fb98f0ced7f3da31be277ca3619203a07e1ee102
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 17 Aug 2020 10:05:25 +0200

replacing: do not try to wipe nonexistent multidata, to avoid crashing

This fixes https://savannah.gnu.org/bugs/?58970.
Reported-by: Matteo Raso <mraso@uoguelph.ca>

Bug existed since version 5.0, commit 569d0056.

Diffstat:
Msrc/search.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/search.c b/src/search.c @@ -493,8 +493,9 @@ char *replace_line(const char *needle) void wipe_and_recalculate_colorinfo(void) { for (linestruct *line = openfile->filetop; line != NULL; line = line->next) - for (short index = 0; index < openfile->syntax->nmultis; index++) - line->multidata[index] = -1; + if (line->multidata) + for (short index = 0; index < openfile->syntax->nmultis; index++) + line->multidata[index] = -1; precalc_multicolorinfo(); }