aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2014-06-29 02:49:45 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2014-06-29 02:49:45 +0000
commit9389649842d73a43dc50e9dd9f5c5c0fce53e055 (patch)
tree17f01f33c20a91178bd54baf36472975f9e50cd3 /libgfortran/io/unix.c
parent7d90d0e1df9b9afddb35c2147b48ee11a3389c34 (diff)
downloadgcc-9389649842d73a43dc50e9dd9f5c5c0fce53e055.zip
gcc-9389649842d73a43dc50e9dd9f5c5c0fce53e055.tar.gz
gcc-9389649842d73a43dc50e9dd9f5c5c0fce53e055.tar.bz2
re PR libfortran/61640 (KIND=4 Character Array Internal Unit Read Fail)
2014-06-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/61640 * io/list_read.c (next_char_internal): Adjust the read length to a single wide character. (eat_spaces): Add missing paren. * io/unix.c (mem_read4): Use the correct mem_alloc function for wide character internal reads. From-SVN: r212118
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index c9866d3..9ad293b 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -808,10 +808,10 @@ mem_read4 (stream * s, void * buf, ssize_t nbytes)
void *p;
int nb = nbytes;
- p = mem_alloc_r (s, &nb);
+ p = mem_alloc_r4 (s, &nb);
if (p)
{
- memcpy (buf, p, nb);
+ memcpy (buf, p, nb * 4);
return (ssize_t) nb;
}
else