summaryrefslogtreecommitdiff
path: root/src/pch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pch.c')
-rw-r--r--src/pch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pch.c b/src/pch.c
index d07c1aa..6909850 100644
--- a/src/pch.c
+++ b/src/pch.c
@@ -1513,7 +1513,9 @@ another_hunk (enum diff difftype, bool rev)
p_suffix_context = ((ptrn_suffix_context != -1
&& ptrn_suffix_context < context)
? ptrn_suffix_context : context);
- assert (p_prefix_context != -1 && p_suffix_context != -1);
+ if (p_prefix_context == -1 || p_suffix_context == -1)
+ fatal ("replacement text or line numbers mangled in hunk at line %s",
+ format_linenum (numbuf0, p_hunk_beg));
if (difftype == CONTEXT_DIFF
&& (fillcnt