aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r--libgfortran/io/transfer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 89f0abe..43b22bf 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -3309,8 +3309,9 @@ data_transfer_init_worker (st_parameter_dt *dtp, int read_flag)
if (dtp->pos != dtp->u.p.current_unit->strm_pos)
{
- fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode);
- if (sseek (dtp->u.p.current_unit->s, dtp->pos - 1, SEEK_SET) < 0)
+ fbuf_reset (dtp->u.p.current_unit);
+ if (sseek (dtp->u.p.current_unit->s, dtp->pos - 1,
+ SEEK_SET) < 0)
{
generate_error (&dtp->common, LIBERROR_OS, NULL);
return;