summaryrefslogtreecommitdiff
path: root/libgfortran/io/list_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/list_read.c')
-rw-r--r--libgfortran/io/list_read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 96db0594b90..1cb329f7df4 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -273,7 +273,7 @@ next_char_internal (st_parameter_dt *dtp)
/* Get the next character and handle end-of-record conditions. */
if (dtp->common.unit) /* Check for kind=4 internal unit. */
- length = sread (dtp->u.p.current_unit->s, &c, sizeof (gfc_char4_t));
+ length = sread (dtp->u.p.current_unit->s, &c, 1);
else
{
char cc;
@@ -399,7 +399,7 @@ eat_spaces (st_parameter_dt *dtp)
{
for (i = 0; i < dtp->u.p.current_unit->bytes_left; i++)
{
- if (dtp->internal_unit[offset + i * sizeof (gfc_char4_t)]
+ if (dtp->internal_unit[(offset + i) * sizeof (gfc_char4_t)]
!= (gfc_char4_t)' ')
break;
}