summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yarp/regexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/yarp/regexp.c b/yarp/regexp.c
index e1de6de7c1..cf9dba95c5 100644
--- a/yarp/regexp.c
+++ b/yarp/regexp.c
@@ -380,7 +380,7 @@ yp_regexp_parse_group(yp_regexp_parser_t *parser) {
break;
case '\'': { // named capture group
const char *start = ++parser->cursor;
- if (!yp_regexp_char_find(parser, '\'')) {
+ if (yp_regexp_char_is_eof(parser) || !yp_regexp_char_find(parser, '\'')) {
return false;
}