Commit 3d092c45 by Jerry DeLisle Committed by Jerry DeLisle

re PR libfortran/23154 (Currupt string and segfault in formatted read.)

2005-08-08  Jerry DeLisle  <jvdelisle@verizon.net>

        PR libfortran/23154
        * io/transfer.c (data_transfer_init): Initialize
        current_unit->bytes_left for a read.

From-SVN: r102893
parent 7c2d3f19
2005-08-08 Jerry DeLisle <jvdelisle@verizon.net>
PR libfortran/23154
* io/transfer.c (data_transfer_init): Initialize
current_unit->bytes_left for a read.
2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi> 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR fortran/22390 PR fortran/22390
......
...@@ -1028,7 +1028,9 @@ data_transfer_init (int read_flag) ...@@ -1028,7 +1028,9 @@ data_transfer_init (int read_flag)
{ {
current_unit->recl = file_length(current_unit->s); current_unit->recl = file_length(current_unit->s);
if (g.mode==WRITING) if (g.mode==WRITING)
empty_internal_buffer (current_unit->s); empty_internal_buffer (current_unit->s);
else
current_unit->bytes_left = current_unit->recl;
} }
/* Check the action. */ /* Check the action. */
......
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