]> git.marmaro.de Git - mmh/commitdiff
fix oldstyle whom
authorPhilipp Takacs <philipp@bureaucracy.de>
Wed, 8 Mar 2017 14:31:37 +0000 (15:31 +0100)
committerPhilipp Takacs <philipp@bureaucracy.de>
Wed, 8 Mar 2017 14:31:37 +0000 (15:31 +0100)
Check if msg struct have selected messages before
accessing a message.

sbr/parse_msgs.c

index f42bd80b01abe12b36c1ff0d5ae4159d060d89a8..9d70cdd70f2aa83db23e47eb4b7a101892ce9db9 100644 (file)
@@ -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);