cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit 4b3e5a6bd64335ad207167fa8fd39a098c50c1db
parent 347b7d0aaaf790df992340525cae076d35d3f27e
Author: Michael Forney <mforney@mforney.org>
Date:   Sat,  6 Jul 2019 15:33:46 -0700

Handle argv = { NULL } in ARGBEGIN

Diffstat:
Marg.h | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arg.h b/arg.h @@ -1,6 +1,7 @@ #define ARGBEGIN \ for (;;) { \ - ++argv, --argc; \ + if (argc > 0) \ + ++argv, --argc; \ if (argc == 0 || (*argv)[0] != '-') \ break; \ if ((*argv)[1] == '-' && !(*argv)[2]) { \