Skip to content

Commit

Permalink
Rework logic to avoid advancing list pointer inside the for loop.
Browse files Browse the repository at this point in the history
closes #3531
  • Loading branch information
Michael Elkins authored and kdave committed Nov 6, 2013
1 parent 66974be commit 1c2550c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rfc822.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,10 +812,9 @@ ADDRESS *rfc822_cpy_adr (ADDRESS *addr, int prune)
{
if (prune && addr->group && (!addr->next || !addr->next->mailbox))
{
addr = addr->next;
continue;
/* ignore this element of the list */
}
if (last)
else if (last)
{
last->next = rfc822_cpy_adr_real (addr);
last = last->next;
Expand Down

0 comments on commit 1c2550c

Please sign in to comment.