diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-08-10 11:45:16 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-08-10 11:45:16 +0300 |
commit | 84b71627b3986acde819444a6644130e22309fc5 (patch) | |
tree | 54efd76791a2c9fb307e944e6b4b53c85d133fa3 | |
parent | bdcad8e531d886fb0074b1239ced50ee1cd5252e (diff) | |
download | egawk-84b71627b3986acde819444a6644130e22309fc5.tar.gz egawk-84b71627b3986acde819444a6644130e22309fc5.tar.bz2 egawk-84b71627b3986acde819444a6644130e22309fc5.zip |
Fix regcomp.c:parse_byte to get full RRI.
-rw-r--r-- | support/regcomp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/support/regcomp.c b/support/regcomp.c index 3b0a3c6b..e81652f2 100644 --- a/support/regcomp.c +++ b/support/regcomp.c @@ -2684,15 +2684,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, # 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 |