From 0d4519f6aa19e7529f1b203cf1584a872b4011aa Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 6 Apr 2022 20:02:36 +0300 Subject: Small fix in dfa.c. --- support/ChangeLog | 6 ++++++ support/dfa.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/support/ChangeLog b/support/ChangeLog index 57603648..86d7baee 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,9 @@ +2022-04-06 Arnold D. Robbins + + * dfa.c (parse_bracket_exp): Use && instead of & in logical test. + Thanks to David Binderman for the report, + courtesy of clang 14. + 2022-03-25 Arnold D. Robbins * cdefs.h, regex_internal.c, regexec.c: Sync with GNULIB. diff --git a/support/dfa.c b/support/dfa.c index a27d096f..45adb80f 100644 --- a/support/dfa.c +++ b/support/dfa.c @@ -1090,7 +1090,7 @@ parse_bracket_exp (struct dfa *dfa) if (wc != wc2 || wc == WEOF) { if (dfa->localeinfo.simple - || (isasciidigit (c) & isasciidigit (c2))) + || (isasciidigit (c) && isasciidigit (c2))) { for (int ci = c; ci <= c2; ci++) if (dfa->syntax.case_fold && isalpha (ci)) -- cgit v1.2.3