aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arg.h b/arg.h
index 6a3f112..9756516 100644
--- 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]) { \