diff options
Diffstat (limited to 'stdio/fread.c')
-rw-r--r-- | stdio/fread.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/stdio/fread.c b/stdio/fread.c index 347e844..d2766f6 100644 --- a/stdio/fread.c +++ b/stdio/fread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -95,8 +95,11 @@ DEFUN(fread, (p, size, nmemb, stream), if (count > 0) { to_read -= count; - stream->__offset += count; - stream->__target += count; + if (stream->__offset != -1) + { + stream->__offset += count; + stream->__target += count; + } ptr += count; } else if (count == 0) |