Package: diction / 1.11-1

ignore-1char-sentences Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Description: Ignore very short sentences to avoid assertion.
 A sentence with very few characters in it confuses style. Skip these
 rather than aborting with an assertion.
Author: Julian Calaby <julian.calaby@gmail.com>
Reviewed-By: Chris Lawrence <lawrencc@debian.org>
Bug-Debian: http://bugs.debian.org/406582
Last-Update: 2014-04-14

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- diction-1.11.orig/style.c
+++ diction-1.11/style.c
@@ -859,9 +859,8 @@ static void style(const char *str, size_
   int nom=0;
   const char *s=str,*end=s+length;
 
-  if (length==0) { ++paragraphs; return; }
+  if (length<2) { ++paragraphs; return; }
   assert(str!=(const char*)0);
-  assert(length>=2);
   phraseEnd = (const char*)0;
   while (s<end)
   {