aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ptx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ptx.c b/src/ptx.c
index 2aababff6..b7aa1079b 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -818,6 +818,11 @@ find_occurs_in_text (int file_index)
case -1:
break;
+ case 0:
+ die (EXIT_FAILURE, 0,
+ _("error: regular expression has a match of length zero: %s"),
+ quote (context_regex.string));
+
default:
next_context_start = cursor + context_regs.end[0];
break;