Commit 87ae0c74 by Greg McGary Committed by Greg McGary

cppfiles.c (actual_directory): Don't write beyond `dir' when it contains "".

	* cppfiles.c (actual_directory): Don't write beyond `dir'
	when it contains "".
	* real.c (asctoeg): Stay within bounds of etens[][].

From-SVN: r35944
parent 15bcd79a
2000-08-24 Greg McGary <greg@mcgary.org>
* cppfiles.c (actual_directory): Don't write beyond `dir'
when it contains "".
* real.c (asctoeg): Stay within bounds of etens[][].
2000-08-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2000-08-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* dependence.c (dependence_string, direction_string, * dependence.c (dependence_string, direction_string,
......
...@@ -1041,8 +1041,8 @@ actual_directory (pfile, fname) ...@@ -1041,8 +1041,8 @@ actual_directory (pfile, fname)
} }
else else
{ {
dir[0] = '.'; free (dir);
dir[1] = '\0'; dir = xstrdup (".");
dlen = 1; dlen = 1;
} }
......
...@@ -5132,9 +5132,9 @@ asctoeg (ss, y, oprec) ...@@ -5132,9 +5132,9 @@ asctoeg (ss, y, oprec)
{ {
unsigned EMUSHORT yy[NI], xt[NI], tt[NI]; unsigned EMUSHORT yy[NI], xt[NI], tt[NI];
int esign, decflg, sgnflg, nexp, exp, prec, lost; int esign, decflg, sgnflg, nexp, exp, prec, lost;
int k, trail, c, rndsav; int i, k, trail, c, rndsav;
EMULONG lexp; EMULONG lexp;
unsigned EMUSHORT nsign, *p; unsigned EMUSHORT nsign;
char *sp, *s, *lstr; char *sp, *s, *lstr;
int base = 10; int base = 10;
...@@ -5418,14 +5418,14 @@ read_expnt: ...@@ -5418,14 +5418,14 @@ read_expnt:
nexp -= 4096; nexp -= 4096;
} }
} }
p = &etens[NTEN][0];
emov (eone, xt); emov (eone, xt);
exp = 1; exp = 1;
i = NTEN;
do do
{ {
if (exp & nexp) if (exp & nexp)
emul (p, xt, xt); emul (etens[i], xt, xt);
p -= NE; i--;
exp = exp + exp; exp = exp + exp;
} }
while (exp <= MAXP); while (exp <= MAXP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment