From 97ac2297e14764ad99b8c20ae091dd8e86f6c0fe Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 1 Aug 2016 01:33:50 -0300 Subject: [PATCH] sch2fig/main.c (main): zero optind to reset getopt --- sch2fig/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sch2fig/main.c b/sch2fig/main.c index 8831595..e651165 100644 --- a/sch2fig/main.c +++ b/sch2fig/main.c @@ -108,8 +108,9 @@ int main(int argc, char *const *argv) found: ; } - - + + optind = 0; /* reset getopt */ + sch_init(&sch_ctx, recurse); sch_parse(&sch_ctx, argv[dashdash - 1]); gfx_init(*ops, gfx_argc, gfx_argv);