summaryrefslogtreecommitdiff
blob: b7538161a72862a53f5f63a3b98a5ff49109aceb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Fix for problem spotted by Matthias Langer in bug #131637

Index: diction-1.07/style.c
===================================================================
--- diction-1.07/style.c	{cset 980e7b47-4932-44e5-a761-6c69c6a771e1}
+++ diction-1.07/style.c	{local clone}
@@ -894,6 +894,11 @@ int main(int argc, char *argv[]) /*{{{*/
   }
   /*}}}*/
   newHit(&lengths);
+  if (strcmp(docLanguage,"de") && strcmp(docLanguage,"en"))
+  {
+    fprintf(stderr,_("style: Incorrect language option `%s'.\n"),docLanguage);
+    exit(1);
+  }
   if (optind==argc) sentence("style",stdin,"(stdin)",style,docLanguage,0);
   else while (optind<argc)
   {