diff options
author | msmith <msmith@FreeBSD.org> | 1997-07-14 13:21:08 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1997-07-14 13:21:08 +0000 |
commit | 9e71915834148018d292199688b0629d169e4741 (patch) | |
tree | ee9954a0d66bb837e704edc9f36842df7d687ab2 /lib | |
parent | 5341bfa761cba6113548f4e7cc3dd82d0d008359 (diff) | |
download | FreeBSD-src-9e71915834148018d292199688b0629d169e4741.zip FreeBSD-src-9e71915834148018d292199688b0629d169e4741.tar.gz |
Fix vi-mode searching broken with the NetBSD changes update.
PR: bin/4064
Submitted by: Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libedit/search.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libedit/search.c b/lib/libedit/search.c index 508835e..0716ff2 100644 --- a/lib/libedit/search.c +++ b/lib/libedit/search.c @@ -464,8 +464,7 @@ cv_search(el, dir) (void)strncpy(tmpbuf, el->el_search.patbuf, sizeof(tmpbuf) - 1); el->el_search.patbuf[0] = '.'; el->el_search.patbuf[1] = '*'; - (void)strncpy(&el->el_search.patbuf[2], tmpbuf, - sizeof(el->el_search.patbuf) - 3); + (void)strncpy(&el->el_search.patbuf[2], tmpbuf, EL_BUFSIZ - 3); el->el_search.patlen++; el->el_search.patbuf[el->el_search.patlen++] = '.'; el->el_search.patbuf[el->el_search.patlen++] = '*'; @@ -479,8 +478,7 @@ cv_search(el, dir) tmpbuf[tmplen++] = '*'; #endif tmpbuf[tmplen] = '\0'; - (void)strncpy(el->el_search.patbuf, tmpbuf, - sizeof(el->el_search.patbuf) - 1); + (void)strncpy(el->el_search.patbuf, tmpbuf, EL_BUFSIZ - 1); el->el_search.patlen = tmplen; } el->el_state.lastcmd = (el_action_t) dir; /* avoid c_setpat */ |