X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=0d700a9e12f8205fbe92f3309cb162dd7cc15d95;hp=39f08c6ca94476757c5591c7a171c74c16875018;hb=61f0a5b8ee2adf540106a09c5f83fe634da6beb3;hpb=8bb5b6201ec2cb890655fee6ef7e540f401a4c7e diff --git a/notmuch-count.c b/notmuch-count.c index 39f08c6c..0d700a9e 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -35,6 +35,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) notmuch_sort_t sort = NOTMUCH_SORT_NEWEST_FIRST; #endif + argc--; argv++; /* skip subcommand argument */ + for (i = 0; i < argc && argv[i][0] == '-'; i++) { if (strcmp (argv[i], "--") == 0) { i++;