File: fix-assertion-noteHit

package info (click to toggle)
diction 1.14-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 968 kB
  • sloc: sh: 3,413; ansic: 2,644; makefile: 89
file content (21 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (2)
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)