diff options
Diffstat (limited to 'libgfortran/io/open.c')
-rw-r--r-- | libgfortran/io/open.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index eaeb5a298c0..82a862b7c47 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -358,7 +358,7 @@ new_unit (unit_flags * flags) /* Unspecified recl ends up with a processor dependent value. */ - u->recl = (ioparm.recl_in != 0) ? ioparm.recl_in : DEFAULT_RECL; + u->recl = (ioparm.recl_in != 0) ? ioparm.recl_in : g.max_offset; u->last_record = 0; u->current_record = 0; @@ -481,7 +481,10 @@ st_open (void) flags.position = POSITION_ASIS; if (ioparm.library_return != LIBRARY_OK) + { + library_end (); return; + } u = find_unit (ioparm.unit); |