summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2022-04-06 20:02:36 +0300
committerArnold D. Robbins <arnold@skeeve.com>2022-04-06 20:02:36 +0300
commit0d4519f6aa19e7529f1b203cf1584a872b4011aa (patch)
tree36e66552fa27c95f513f38bf39e0441422ab3637 /support
parent1c51faed4fd14db4a39729640bdf3a381d680f9e (diff)
downloadgawk-0d4519f6aa19e7529f1b203cf1584a872b4011aa.tar.gz
Small fix in dfa.c.
Diffstat (limited to 'support')
-rw-r--r--support/ChangeLog6
-rw-r--r--support/dfa.c2
2 files changed, 7 insertions, 1 deletions
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 <arnold@skeeve.com>
+
+ * dfa.c (parse_bracket_exp): Use && instead of & in logical test.
+ Thanks to David Binderman <dcb314@hotmail.com> for the report,
+ courtesy of clang 14.
+
2022-03-25 Arnold D. Robbins <arnold@skeeve.com>
* 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))