Package: diction / 1.11-1

fix-assertion-noteHit Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Ignore single letters with ellipses and question marks.
 Style dies while processing any document that contains a sentence
 starting with a capital letter and a word immediately followed by
 three ASCII periods immediately followed by a space immediately
 followed by question mark. Fix that.
Author: Julian Calaby <julian.calaby@gmail.com>
Reviewed-By: Chris Lawrence <lawrencc@debian.org>
Bug-Debian: http://bugs.debian.org/477748
Last-Update: 2014-04-14

--- diction-1.11.orig/style.c
+++ diction-1.11/style.c
@@ -78,7 +78,7 @@ static void newHit(struct Hit *hit) /*{{
 /*}}}*/
 static void noteHit(struct Hit *hit, int n) /*{{{*/
 {
-  assert(n>0);
+  if (n==0) return;
   if (n>hit->capacity)
   {
     if ((hit->data=realloc(hit->data,n*2*sizeof(int)))==(int*)0)