]> Zhao Yanbai Git Server - minix.git/commitdiff
lib: bugfix for mbstowcs, debugged by Gautam Tirumala.
authorBen Gras <ben@minix3.org>
Sun, 18 Jul 2010 20:57:55 +0000 (20:57 +0000)
committerBen Gras <ben@minix3.org>
Sun, 18 Jul 2010 20:57:55 +0000 (20:57 +0000)
lib/libc/ansi/mbstowcs.c

index 2749cbace423e759982b110ac4ef1e00d03198ee..7b2015c91024a7c59aed794f24e3a48b504b27e3 100644 (file)
@@ -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;
 }