From 78b9c394d4df10be72515b4b58204e43adc1026a Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Sat, 11 Feb 2012 23:28:10 -0500 Subject: [PATCH] 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. --- uip/new.c | 2 ++ 1 file changed, 2 insertions(+) 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; } } -- 1.7.10.4