summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-02-23 23:04:30 +0000
committerKarl Heuer <kwzh@gnu.org>1994-02-23 23:04:30 +0000
commit165c67142ad9408b8f3ada88068532378fe37d10 (patch)
treee8302dd162e36dcea6134e056db92caa7d443198 /src/regex.c
parent1c5ceaf673898137f03c2851f4befb4fc2b2b89a (diff)
downloademacs-165c67142ad9408b8f3ada88068532378fe37d10.tar.gz
*** empty log message ***
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/regex.c b/src/regex.c
index 532d75330dc..c66a223f4b7 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4463,8 +4463,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
mcnt = (int) Sword;
matchsyntax:
PREFETCH ();
- if (SYNTAX (*d++) != (enum syntaxcode) mcnt)
- goto fail;
+ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
+ d++;
+ if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
+ goto fail;
SET_REGS_MATCHED ();
break;
@@ -4478,8 +4480,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
mcnt = (int) Sword;
matchnotsyntax:
PREFETCH ();
- if (SYNTAX (*d++) == (enum syntaxcode) mcnt)
- goto fail;
+ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
+ d++;
+ if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
+ goto fail;
SET_REGS_MATCHED ();
break;