X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=notmuch-count.c;h=0d700a9e12f8205fbe92f3309cb162dd7cc15d95;hb=61f0a5b8ee2adf540106a09c5f83fe634da6beb3;hp=39f08c6ca94476757c5591c7a171c74c16875018;hpb=8cbb5114a20c1217f23977fd5edca99a0b7a2955;p=notmuch 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++;