diff options
-rw-r--r-- | lib/libc/stdio/fgets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c index c7c1abc..186a1a1 100644 --- a/lib/libc/stdio/fgets.c +++ b/lib/libc/stdio/fgets.c @@ -61,7 +61,7 @@ fgets(buf, n, fp) register char *s; register unsigned char *p, *t; - if (n == 0) /* sanity check */ + if (n <= 0) /* sanity check */ return (NULL); #ifdef _THREAD_SAFE |