aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-08-14 18:16:53 -0400
committerDave Reisner <dreisner@archlinux.org>2012-08-14 18:16:53 -0400
commit8052cbee80429e24e41c765b1547e1ca30e5f13f (patch)
treedd1f6deaf7bf0b6fdf84a8a82920e507e14372fd
parentd07eac047131c6fd37a26e003da85f5bb0432526 (diff)
downloadmirror-ponymix-8052cbee80429e24e41c765b1547e1ca30e5f13f.tar.gz
mirror-ponymix-8052cbee80429e24e41c765b1547e1ca30e5f13f.tar.bz2
mirror-ponymix-8052cbee80429e24e41c765b1547e1ca30e5f13f.zip
fix (null) string on unknown action
-rw-r--r--ponymix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ponymix.c b/ponymix.c
index 6177875..81ef211 100644
--- a/ponymix.c
+++ b/ponymix.c
@@ -755,7 +755,7 @@ int main(int argc, char *argv[])
verb = string_to_verb(argv[optind++]);
if (verb == ACTION_INVALID)
- errx(EXIT_FAILURE, "unknown action: %s", argv[optind]);
+ errx(EXIT_FAILURE, "unknown action: %s", argv[optind - 1]);
if (actions[verb].argreq != (argc - optind))
errx(EXIT_FAILURE, "wrong number of args for %s command (requires %d)",