From: Philipp Takacs Date: Wed, 8 Mar 2017 14:31:37 +0000 (+0100) Subject: fix oldstyle whom X-Git-Tag: mmh-0.4~42 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=bd7e2d5cc610c87f2f8c2df507bb7eda86cce90e;p=mmh fix oldstyle whom Check if msg struct have selected messages before accessing a message. --- diff --git a/sbr/parse_msgs.c b/sbr/parse_msgs.c index f42bd80..9d70cdd 100644 --- a/sbr/parse_msgs.c +++ b/sbr/parse_msgs.c @@ -36,7 +36,7 @@ parse_msgs(const struct msgs_array *msgs, char *folder, struct msgs_array *files } } - for (i = f->lowsel; i <= f->hghsel; i++) { + for (i = f->lowsel; f->numsel > 0 && i <= f->hghsel; i++) { if (is_selected(f, i)) { msgnam = mh_xstrdup(path); msgnam = add(m_name(i), msgnam);