diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2016-07-17 11:25:24 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2016-07-17 11:25:24 +0000 |
commit | 7e9488dda307d2f746183a434b7134c85d9c65a5 (patch) | |
tree | a49cc9eb5f7216b64d48d8af191a3475f1d7b139 | |
parent | aa3d69a636cb13ee197e354aa9cb9e3abafe0987 (diff) |
Notes
-rw-r--r-- | lib/libc/gen/glob.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index 878457751316..5f93a6a13a03 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -979,14 +979,14 @@ g_Ctoc(const Char *str, char *buf, size_t len) memset(&mbs, 0, sizeof(mbs)); while (len >= MB_CUR_MAX) { - clen = wcrtomb(buf, *str, &mbs); + clen = wcrtomb(buf, CHAR(*str), &mbs); if (clen == (size_t)-1) { /* XXX See initial comment #2. */ - *buf = (char)*str; + *buf = (char)CHAR(*str); clen = 1; memset(&mbs, 0, sizeof(mbs)); } - if (*buf == '\0') + if (CHAR(*str) == EOS) return (0); str++; buf += clen; |