From: Ken Hornstein Date: Sun, 12 Feb 2012 04:28:10 +0000 (-0500) Subject: Another problem discovered by the test suite. X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=78b9c394d4df10be72515b4b58204e43adc1026a;p=mmh Another problem discovered by the test suite. With multiple sequence arguments on the command line you might end up with garbage in the sequence[] array (it needs the last argument to be a NULL. So do two things: make the first two arguments NULL, and as we add arguments to sequence[] make sure the list has a NULL on the end. --- diff --git a/uip/new.c b/uip/new.c index 752f028..38c8f0b 100644 --- a/uip/new.c +++ b/uip/new.c @@ -409,6 +409,7 @@ main(int argc, char **argv) struct node *folder; sequences[0] = NULL; + sequences[1] = NULL; #ifdef LOCALE setlocale(LC_ALL, ""); @@ -456,6 +457,7 @@ main(int argc, char **argv) /* have a sequence argument */ if (!seq_in_list(cp, sequences)) { sequences[i++] = cp; + sequences[i] = NULL; } }