From 3b659767f780eabaa4fd2f9285104f64def328be Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Mon, 27 May 2019 07:58:59 +0000 Subject: [PATCH] Fix list-reply regression introduced when converting Address to TAILQ Fixes #1724 --- send.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/send.c b/send.c index 5f7a1e709..fa74ce7e2 100644 --- a/send.c +++ b/send.c @@ -179,10 +179,11 @@ static void remove_user(struct AddressList *al, bool leave_only) static void add_mailing_lists(struct AddressList *out, const struct AddressList *t, const struct AddressList *c) { - const struct AddressList *const als[] = { t, c, NULL }; + const struct AddressList *const als[] = { t, c }; - for (const struct AddressList *al = *als; al; ++al) + for (size_t i = 0; i < mutt_array_size(als); ++i) { + const struct AddressList *al = als[i]; struct Address *a = NULL; TAILQ_FOREACH(a, al, entries) { @@ -1032,7 +1033,7 @@ static int envelope_defaults(struct Envelope *env, struct Mailbox *m, else if (mutt_fetch_recips(env, curenv, flags) == -1) return -1; - if ((flags & SEND_LIST_REPLY) && !TAILQ_EMPTY(&env->to)) + if ((flags & SEND_LIST_REPLY) && TAILQ_EMPTY(&env->to)) { mutt_error(_("No mailing lists found")); return -1; -- 2.40.0