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