Make -volume switch actually work (it always got overridden).
authormarkus schnalke <meillo@marmaro.de>
Tue, 27 Mar 2012 11:58:45 +0000 (13:58 +0200)
committermarkus schnalke <meillo@marmaro.de>
Tue, 27 Mar 2012 11:58:45 +0000 (13:58 +0200)
As far as I can tell, this never worked. Found by the nmh test suite!

Pulled in from nmh. Thanks to Ken Hornstein.

uip/forw.c

index be1242b..140136a 100644 (file)
@@ -226,11 +226,12 @@ main(int argc, char **argv)
                                issue = 0;
                        issue++;
                }
-               if (volume == 0)
+               if (volume == 0) {
                        snprintf(buf, sizeof(buf), VFORMAT, digest);
-               if ((cp = context_find(buf)) == NULL ||
-                               (volume = atoi(cp)) <= 0)
-                       volume = 1;
+                       if ((cp = context_find(buf)) == NULL ||
+                                       (volume = atoi(cp)) <= 0)
+                               volume = 1;
+               }
                if (!form)
                        form = digestcomps;
                in = build_form(form, digest, volume, issue);