From 2ed0a0ea6032ce8d47bf1ab71c1641a731fcf858 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Thu, 30 Mar 2017 18:32:52 +0200 Subject: mpick: fix flags fixes #21 --- mpick.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'mpick.c') diff --git a/mpick.c b/mpick.c index 39bfc6b..9277df7 100644 --- a/mpick.c +++ b/mpick.c @@ -128,7 +128,7 @@ struct mailinfo { int replies; int matched; int prune; - long flags; + int flags; off_t total; char subject[100]; }; @@ -199,6 +199,7 @@ mkexpr(enum op op) if (!e) parse_error("out of memory"); e->op = op; + e->extra = 0; return e; } @@ -850,7 +851,9 @@ eval(struct expr *e, struct mailinfo *m) exit(2); } - if (e->extra) { + n = e->b.num; + + if (e->extra) switch (e->b.var) { case VAR_CUR: if (!cur_idx) @@ -858,11 +861,7 @@ eval(struct expr *e, struct mailinfo *m) else n = cur_idx; break; - default: n = 0; } - } else { - n = e->b.num; - } switch (e->a.prop) { case PROP_ATIME: if (m->sb) v = m->sb->st_atime; break; -- cgit 1.4.1