stringlist_to_clist() will now not try to encode empty stringlists diphoton_M1
authorKrista Bennett <krista@pep-project.org>
Tue, 24 Oct 2017 12:08:45 +0200
branchdiphoton_M1
changeset 2249b48a0414bf72
parent 2248 b3a05d6c6d15
child 2250 13d16e688d1b
stringlist_to_clist() will now not try to encode empty stringlists
src/mime.c
     1.1 --- a/src/mime.c	Mon Oct 23 13:19:49 2017 +0200
     1.2 +++ b/src/mime.c	Tue Oct 24 12:08:45 2017 +0200
     1.3 @@ -391,6 +391,9 @@
     1.4      if (cl == NULL)
     1.5          return NULL;
     1.6  
     1.7 +    if (!sl || ((!sl->value || sl->value[0] == '\0') && sl->next == NULL))
     1.8 +        return cl;
     1.9 +        
    1.10      stringlist_t *_sl;
    1.11      for (_sl = sl; _sl; _sl = _sl->next) {
    1.12          int r;