summaryrefslogtreecommitdiff
path: root/regparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'regparse.c')
-rw-r--r--regparse.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/regparse.c b/regparse.c
index 0cc9a62..9f46b15 100644
--- a/regparse.c
+++ b/regparse.c
@@ -3585,8 +3585,10 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
}
}
}
- else
- PUNFETCH;
+ else {
+ PUNFETCH;
+ onig_syntax_warn(env, "invalid back reference");
+ }
}
break;
#endif
@@ -3608,8 +3610,10 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
tok->u.call.name_end = name_end;
tok->u.call.gnum = gnum;
}
- else
- PUNFETCH;
+ else {
+ onig_syntax_warn(env, "invalid subexp call");
+ PUNFETCH;
+ }
}
break;
#endif