about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-08-11 14:40:51 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-08-11 14:40:51 +0200
commit74857db19977d6ef880d5743e23d61c119cfc367 (patch)
treebb2f2e0943daea02b59b7070ca6baef1f329d6a0
parent32b5837bfd8d566263bc0de99f4708993b1a02c7 (diff)
downloadmblaze-74857db19977d6ef880d5743e23d61c119cfc367.tar.gz
mblaze-74857db19977d6ef880d5743e23d61c119cfc367.tar.xz
mblaze-74857db19977d6ef880d5743e23d61c119cfc367.zip
mseq: reinitialize iter for each command line argument
Fixes #181.
-rw-r--r--mseq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mseq.c b/mseq.c
index b8ebcfe..4bcb89f 100644
--- a/mseq.c
+++ b/mseq.c
@@ -321,7 +321,6 @@ usage:
 	int i;
 	char *f;
 	char *a;
-	struct blaze822_seq_iter iter = { 0 };
 
 	if (optind == argc) {
 		a = ":";
@@ -335,6 +334,7 @@ hack:
 			printf("%s\n", a);
 			continue;
 		}
+		struct blaze822_seq_iter iter = { 0 };
 		while ((f = blaze822_seq_next(seq, a, &iter))) {
 			char *s = f;
 			if (rflag)