From: David Lawrence Ramsey Date: Mon, 18 Jul 2005 05:23:04 +0000 (+0000) Subject: comment fix X-Git-Tag: v1.3.9~157 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=24b156306821590c638cf6ac068dabada71211f6;p=nano.git comment fix git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2889 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/search.c b/src/search.c index f9c94720..034d3de2 100644 --- a/src/search.c +++ b/src/search.c @@ -799,7 +799,8 @@ ssize_t do_replace_loop(const char *needle, const filestruct if (i == 2) replaceall = TRUE; - /* Get the match's length in single-byte characters. */ + /* Make sure the string we replace is the match's length in + * single-byte characters. */ match = mallocstrncpy(NULL, openfile->current->data + openfile->current_x, match_len + 1); match[match_len] = '\0';