summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index dedcd0079d..556922a1ba 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4285,7 +4285,8 @@ S_nextchar(pTHX_ RExC_state_t *pRExC_state)
else if (*RExC_parse == '#') {
while (*RExC_parse && *RExC_parse != '\n')
RExC_parse++;
- RExC_parse++;
+ if (*RExC_parse)
+ RExC_parse++;
continue;
}
}