Commit dbe81a8b by Andreas Krebbel Committed by Paul Brook

re PR libfortran/16291 (F2003 formatting of Inf /Nan on irix6.5)

	PR fortran/16291
	* libgfortran/io/write.c: (write_float): Added length check.
	Remove pointless memset calls.

From-SVN: r84308
parent 36c1b0de
2004-07-08 Andreas Krebbel <krebbel1@de.ibm.com>
PR fortran/16291
* libgfortran/io/write.c: (write_float): Added length check.
Remove pointless memset calls.
2004-07-04 Bud Davis <bdavis9659@comcast.net> 2004-07-04 Bud Davis <bdavis9659@comcast.net>
Paul Brook <paul@codesourcery.com> Paul Brook <paul@codesourcery.com>
......
...@@ -535,10 +535,10 @@ write_float (fnode *f, const char *source, int len) ...@@ -535,10 +535,10 @@ write_float (fnode *f, const char *source, int len)
memcpy(p + nb - 8, "Infinity", 8); memcpy(p + nb - 8, "Infinity", 8);
else else
memcpy(p + nb - 3, "Inf", 3); memcpy(p + nb - 3, "Inf", 3);
if (nb < 8) if (nb < 8 && nb > 3)
memset(p + nb - 4, fin, 1); p[nb - 4] = fin;
else if (nb > 8) else if (nb > 8)
memset(p + nb - 9, fin, 1); p[nb - 9] = fin;
} }
else else
memcpy(p + nb - 3, "NaN", 3); memcpy(p + nb - 3, "NaN", 3);
......
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