From bd7e2d5cc610c87f2f8c2df507bb7eda86cce90e Mon Sep 17 00:00:00 2001 From: Philipp Takacs Date: Wed, 8 Mar 2017 15:31:37 +0100 Subject: [PATCH] fix oldstyle whom Check if msg struct have selected messages before accessing a message. --- sbr/parse_msgs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.7.10.4