Formerly ../stdio/fwrite.c.~14~
authorroland <roland>
Sat, 31 Aug 1991 01:40:36 +0000 (01:40 +0000)
committerroland <roland>
Sat, 31 Aug 1991 01:40:36 +0000 (01:40 +0000)
stdio/fwrite.c

index d2dd487..9fa3f4a 100644 (file)
@@ -62,6 +62,12 @@ DEFUN(fwrite, (ptr, size, nmemb, stream),
   default_func
     = stream->__room_funcs.__output == __default_room_functions.__output;
 
+  if (__stdio_check_offset (stream) == EOF)
+    {
+      stream->__error = 1;
+      goto done;
+    }
+
   if (stream->__buffer == NULL && default_func &&
       stream->__offset == stream->__target)
   write_through: