plug a buffer in search; mpech@ ok, submitted upstream

This commit is contained in:
avsm 2003-06-19 13:56:11 +00:00
parent 6cc497d982
commit 1af5667625

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-usearch_c,v 1.1 2003/06/19 13:56:11 avsm Exp $
--- usearch.c.orig Wed Jun 18 04:13:22 2003
+++ usearch.c Wed Jun 18 04:13:49 2003
@@ -346,7 +346,7 @@ static int set_pattern(BW *bw, char *s,
if (srch->backwards)
binsc(pbw->cursor, 'b');
if (srch->repeat >= 0)
- snprintf(buf, JOE_MSGBUFSIZE, "%d", srch->repeat), binss(pbw->cursor, buf);
+ snprintf(buf, sizeof buf, "%d", srch->repeat), binss(pbw->cursor, buf);
pset(pbw->cursor, pbw->b->eof);
pbw->cursor->xcol = piscol(pbw->cursor);
srch->ignore = 0;