]> code.citadel.org Git - citadel.git/commitdiff
qp_encode_email_addrs() returns the supplied pointer unchanged
authorArt Cancro <ajc@citadel.org>
Wed, 11 Jun 2008 20:33:00 +0000 (20:33 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 11 Jun 2008 20:33:00 +0000 (20:33 +0000)
if it points to an empty string.

citadel/msgbase.c

index dc54bf9b194761d83af5604d44cfe7e7fe7e9cb4..8e2a8228efb6613c26224b0671ae9bd95f7e55a8 100644 (file)
@@ -1451,6 +1451,7 @@ int CtdlOutputMsg(long msg_num,           /* message number (local) to fetch */
        return(retcode);
 }
 
+
 char *qp_encode_email_addrs(char *source)
 {
        char user[256], node[256], name[256];
@@ -1469,9 +1470,8 @@ char *qp_encode_email_addrs(char *source)
        int InQuotes = 0;
        int i, n;
 
-       
-       if (source == NULL)
-               return source;
+       if (source == NULL) return source;
+       if (IsEmptyStr(source)) return source;
 
        AddrPtr = malloc (sizeof (long) * nAddrPtrMax);
        AddrUtf8 = malloc (sizeof (long) * nAddrPtrMax);
@@ -1564,6 +1564,7 @@ char *qp_encode_email_addrs(char *source)
        return Encoded;
 }
 
+
 /*
  * Get a message off disk.  (returns om_* values found in msgbase.h)
  */