Author | Jakob Wakeling <[email protected]> |
Date | 2022-03-27 00:08:05 |
Commit | d38c160b2b031552bcbe4daf190f1e71ba28bed3 |
Parent | 4bb593b4a0ffdd5188fa9453512c2ec25425cb89 |
main: Improve debug arguments
Diffstat
M | src/main.c | | | 3 | ++- |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 118bdf2..480721d 100644 --- a/src/main.c +++ b/src/main.c @@ -29,7 +29,8 @@ static void hlp(void); static void ver(void); int main(int ac, char *av[]) { A0 = av[0]; - if (ac == 1) { ac = 3; av = aw; } /* DEBUG */ + /* DEBUG */ + if (ac == 1) { ac = (sizeof (aw) / sizeof (*aw)) - 1; av = aw; } struct opt opt = OPTGET_INIT; opt.str = ""; opt.lops = lops; for (int o; (o = optget(&opt, av, 1)) != -1;) switch (o) {