From 7b317f79e28138cd6c3149342551f8890a571b3f Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 9 Nov 1987 11:45:39 +0000 Subject: [PATCH] The 'ahead' mechanism was not right --- modules/src/read_em/read_em.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;