From: Ben Gras Date: Sun, 18 Jul 2010 20:57:55 +0000 (+0000) Subject: lib: bugfix for mbstowcs, debugged by Gautam Tirumala. X-Git-Tag: v3.1.8~206 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/man.3.ps?a=commitdiff_plain;h=09c18bc9186447e086816fa84875819874c3c9db;p=minix.git lib: bugfix for mbstowcs, debugged by Gautam Tirumala. --- diff --git a/lib/libc/ansi/mbstowcs.c b/lib/libc/ansi/mbstowcs.c index 2749cbace..7b2015c91 100644 --- a/lib/libc/ansi/mbstowcs.c +++ b/lib/libc/ansi/mbstowcs.c @@ -15,6 +15,6 @@ mbstowcs(register wchar_t *pwcs, register const char *s, size_t n) if (!(*pwcs++ = *s++)) return n - i - 1; } - return n - i; + return n; }