diff options
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/unix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index c76b427..61e9f79 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -582,6 +582,9 @@ buf_read (unix_stream *s, void *buf, ssize_t nbyte) static ssize_t buf_write (unix_stream *s, const void *buf, ssize_t nbyte) { + if (nbyte == 0) + return 0; + if (s->ndirty == 0) s->buffer_offset = s->logical_offset; |