diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2004-08-06 17:00:09 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2004-08-06 17:00:09 +0000 |
| commit | 91f18ef9289c9e48c35ee5df3340022ceab54149 (patch) | |
| tree | 94bed82daa80b06b78e1ee71d9f301f3d0a2055a /lib/libc | |
| parent | ddabcdb43335f554ea36613638473f30a3a6c809 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/stdio/fgetwln.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/stdio/fgetwln.c b/lib/libc/stdio/fgetwln.c index a55932172fa5..1a1ad2ddeaa0 100644 --- a/lib/libc/stdio/fgetwln.c +++ b/lib/libc/stdio/fgetwln.c @@ -46,11 +46,10 @@ fgetwln(FILE * __restrict fp, size_t *lenp) len = 0; while ((wc = __fgetwc(fp)) != WEOF) { #define GROW 512 - len++; if (len * sizeof(wchar_t) >= fp->_lb._size && __slbexpand(fp, (len + GROW) * sizeof(wchar_t))) goto error; - *((wchar_t *)fp->_lb._base + len) = wc; + *((wchar_t *)fp->_lb._base + len++) = wc; if (wc == L'\n') break; } |
