From: ceriel Date: Mon, 9 Nov 1987 11:45:39 +0000 (+0000) Subject: The 'ahead' mechanism was not right X-Git-Tag: release-5-5~3739 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7b317f79e28138cd6c3149342551f8890a571b3f;p=ack.git The 'ahead' mechanism was not right --- diff --git a/modules/src/read_em/read_em.c b/modules/src/read_em/read_em.c index ec7f91667..e7cd58d80 100644 --- a/modules/src/read_em/read_em.c +++ b/modules/src/read_em/read_em.c @@ -217,7 +217,11 @@ EM_getinstr(p) EM_error = 0; if (ahead) { - *p = aheads[--ahead]; + register int i; + + ahead--; + *p = aheads[0]; + for (i = 0; i < ahead; i++) aheads[i] = aheads[i+1]; return 1; } emhead = p;