Package: spell
Version: 1.0-24
Severity: normal
Tags: patch

Dear Maintainer,

consider this script:

for i in "spell" "spell -" "spell -D italian" "spell -D italian - " ; do
    echo ==== $i
    echo casa house sdfsdfhk | $i
done

and its output:

    ==== spell
    casa
    sdfsdfhk
    ==== spell -
    casa
    sdfsdfhk
    ==== spell -D italian
    ==== spell -D italian -
    house
    sdfsdfhk

The cause is a test for "default to stdin" that fails when argc > 1
(because options where specified in the command line).  The attached
patch fixes that.

Best regards
        g

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages spell depends on:
ii  iamerican [ispell-dictionary]  3.3.02-6
ii  iitalian [ispell-dictionary]   1:2.3-3
ii  ispell                         3.3.02-6
ii  libc6                          2.13-38

spell recommends no packages.

spell suggests no packages.

-- no debconf information
--- spell.c.orig	2013-06-21 11:41:44.000000000 +0200
+++ spell.c	2013-06-21 11:46:27.000000000 +0200
@@ -613,7 +613,7 @@
   }
   file = xstrdup ("-");
 
-  if (argc == 1)
+  if (argc <= optind)
     read_file (the_pipe, stdin, "-");
 
   while (arg_index < argc)

Reply via email to