re PR fortran/40576 (Endless loop in internal write)

2009-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/40576
	* io/transfer.c (sset): Adjust exit condition for loop.

From-SVN: r149075
This commit is contained in:
Jerry DeLisle 2009-06-30 00:46:35 +00:00
parent b94f4bef8b
commit 93ab3a3d79
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40576
* io/transfer.c (sset): Adjust exit condition for loop.
2009-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40508

View File

@ -2867,7 +2867,7 @@ sset (stream * s, int c, ssize_t nbyte)
{
trans = (bytes_left < WRITE_CHUNK) ? bytes_left : WRITE_CHUNK;
trans = swrite (s, p, trans);
if (trans < 0)
if (trans <= 0)
return trans;
bytes_left -= trans;
}