Fixed naughty const behaviour. Sorry Roker :)
authorKrista Bennett <krista@pep-project.org>
Thu, 31 Aug 2017 11:54:22 +0200
changeset 2026abfaf7856b83
parent 2024 1b1051f096cc
child 2027 4eda8aa79e5b
Fixed naughty const behaviour. Sorry Roker :)
src/mime.c
     1.1 --- a/src/mime.c	Wed Aug 30 15:45:22 2017 +0200
     1.2 +++ b/src/mime.c	Thu Aug 31 11:54:22 2017 +0200
     1.3 @@ -706,10 +706,13 @@
     1.4          
     1.5          bloblist_t* inlined_attachments = NULL;
     1.6          /* Noooooo... dirk, why do you do this to me? */
     1.7 -        split_inlined_and_attached(&inlined_attachments, &msg->attachments);
     1.8 +        message* duped_msg = message_dup(msg);
     1.9 +        split_inlined_and_attached(&inlined_attachments, &duped_msg->attachments);
    1.10  
    1.11 +        status = mime_html_text(plaintext, htmltext, inlined_attachments, &mime);
    1.12          
    1.13 -        status = mime_html_text(plaintext, htmltext, inlined_attachments, &mime);
    1.14 +        free_message(duped_msg);
    1.15 +        
    1.16          if (status != PEP_STATUS_OK)
    1.17              goto pep_error;
    1.18      }