From: ceriel Date: Thu, 5 Feb 1987 18:33:44 +0000 (+0000) Subject: bug fix X-Git-Tag: release-5-5~4748 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d5d4c551c51caebd8388868931b08207a6564290;p=ack.git bug fix --- diff --git a/modules/src/read_em/read_em.c b/modules/src/read_em/read_em.c index a72f58666..e0ddce807 100644 --- a/modules/src/read_em/read_em.c +++ b/modules/src/read_em/read_em.c @@ -54,7 +54,10 @@ _fill() #define STRSIZ 256 /* Maximum length of strings */ static struct e_instr emhead; /* Where we put the head */ -static struct e_args emargs[NARGS]; /* Where we put the arguments */ +static struct e_args emargs[NARGS+2]; /* Where we put the arguments. + We need some more because some + arguments are constructed + */ static struct e_args *i_emargs; #define argentry() (i_emargs++) static struct string { diff --git a/modules/src/read_em/readk.c b/modules/src/read_em/readk.c index 1ba9df643..49aa26d98 100644 --- a/modules/src/read_em/readk.c +++ b/modules/src/read_em/readk.c @@ -132,16 +132,17 @@ getarg(typset) case sp_doff: /* A data label + offset */ { - register struct e_args *ap1, *ap2; + register struct e_args *ap1; ap1 = getarg(lab_ptyp); - ap2 = getarg(cst_ptyp); *ap = *ap1; - if (ap->em_argtype == sof_ptyp) { /* non-numeric label */ - ap->em_soff = ap2->em_cst; + i_emargs--; + ap1 = getarg(cst_ptyp); + if (argtyp == sof_ptyp) { /* non-numeric label */ + ap->em_soff = ap1->em_cst; } - else ap->em_noff = ap2->em_cst; - i_emargs -= 2; + else ap->em_noff = ap1->em_cst; + i_emargs--; break; } @@ -149,10 +150,10 @@ getarg(typset) case sp_ucon: /* An unsigned constant */ case sp_fcon: /* A floating constant */ { - register struct e_args *ap1; register struct string *p; - ap1 = getarg(cst_ptyp); + ap->em_size = getarg(cst_ptyp)->em_cst; + i_emargs--; p = getstring(0); #ifdef CHECKING if (state & INSTRING) { @@ -161,8 +162,6 @@ getarg(typset) #endif CHECKING ap->em_argtype = ptyp(i); ap->em_str = p->str; - ap->em_size = ap1->em_cst; - i_emargs--; break; }