diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2001-03-07 09:47:29 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2001-03-07 09:47:29 +0000 |
commit | 1e26922dfcadb624e4b2dd26c7d2b99477814e91 (patch) | |
tree | 5da719d1416324fe3ffcd8d4645028ca811ed16b /libc/stdio | |
parent | fae403620c5c9329a78f5da5cd81b8f04f45a012 (diff) |
Fix a bad assertion test.
Diffstat (limited to 'libc/stdio')
-rw-r--r-- | libc/stdio/stdio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c index 0baedcdf3..73b9d1aee 100644 --- a/libc/stdio/stdio.c +++ b/libc/stdio/stdio.c @@ -790,7 +790,8 @@ void _free_stdio_stream(FILE *fp) /* Note: we generally won't bother checking for bad pointers here. */ if ((fp >= _stdio_streams) && (fp < _stdio_streams + FIXED_STREAMS)) { - assert( (fp - _stdio_streams) % sizeof(_stdio_streams[0]) == 0 ); + assert( (fp - _stdio_streams) % ((_stdio_streams+1) -_stdio_streams) + == 0 ); fp->next = _free_file_list; _free_file_list = fp; return; |