diff --git a/minichlink/minichlink.c b/minichlink/minichlink.c index 6636927020cb894b0161239fbbfa404e0a33ac5c..2bb7a04429fea0d0546aeabe20ee4df20ccfc03d 100644 --- a/minichlink/minichlink.c +++ b/minichlink/minichlink.c @@ -70,7 +70,8 @@ void parse_possible_init_hints(int argc, char **argv, init_hints_t *hints) int c; opterr = 0; /* we're only interested in the value for the COM port, given in a -c parameter */ - while ((c = getopt(argc, argv, "c:")) != -1) + /* the '-' is really important so that getopt does not permutate the argv array and messes up parsing later */ + while ((c = getopt(argc, argv, "-c:")) != -1) { switch (c) { diff --git a/minichlink/minichlink.exe b/minichlink/minichlink.exe index 04692974c75efa7a78c2f956226a31c8c3f24050..a52fdbc65872c0fc70a1facfb7fa9cbe22a35552 100644 Binary files a/minichlink/minichlink.exe and b/minichlink/minichlink.exe differ