Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/wbuf.c')
-rw-r--r--newlib/libc/stdio/wbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/stdio/wbuf.c b/newlib/libc/stdio/wbuf.c
index 247490303..2e742e255 100644
--- a/newlib/libc/stdio/wbuf.c
+++ b/newlib/libc/stdio/wbuf.c
@@ -56,7 +56,8 @@ __swbuf_r (struct _reent *ptr,
return EOF;
c = (unsigned char) c;
- ORIENT (fp, -1);
+ if (ORIENT (fp, -1) != -1)
+ return EOF;
/*
* If it is completely full, flush it out. Then, in any case,