# HG changeset patch # User Paul Eggert # Date 1533936535 25200 # Node ID dfd69627235c1525c6c9a88a4656cf3117bcee7b # Parent 000739ee1056225393dc03f146dba9c053d8e225 autoupdate diff -r 000739ee1056 -r dfd69627235c lib/regcomp.c --- a/lib/regcomp.c Wed Aug 08 10:06:37 2018 -0700 +++ b/lib/regcomp.c Fri Aug 10 14:28:55 2018 -0700 @@ -2684,15 +2684,14 @@ # ifdef RE_ENABLE_I18N /* Convert the byte B to the corresponding wide character. In a - unibyte locale, treat B as itself if it is an encoding error. - In a multibyte locale, return WEOF if B is an encoding error. */ + unibyte locale, treat B as itself. In a multibyte locale, return + WEOF if B is an encoding error. */ static wint_t parse_byte (unsigned char b, re_charset_t *mbcset) { - wint_t wc = __btowc (b); - return wc == WEOF && !mbcset ? b : wc; + return mbcset == NULL ? b : __btowc (b); } -#endif +# endif /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends