From: Wilfried Goesgens Date: Wed, 5 Dec 2012 22:55:39 +0000 (+0100) Subject: GVEA: StrLength is NULL-Safe and truly tells us whether the string is actually there. X-Git-Tag: v8.20~176 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=51477768eb644dcad766e57190f56ec8d9c76e51 GVEA: StrLength is NULL-Safe and truly tells us whether the string is actually there. --- diff --git a/webcit/preferences.c b/webcit/preferences.c index 1155a182d..242dbbddb 100644 --- a/webcit/preferences.c +++ b/webcit/preferences.c @@ -1055,9 +1055,9 @@ HashList *GetGVEAHash(StrBuf *Target, WCTemplputParams *TP) i = snprintf(N, sizeof(N), "%d", n); StrBufTrim(Rcp); VEA->Address = Rcp; - if (EnvelopeTo != NULL) + if (StrLength(EnvelopeTo) > 0) VEA->IsDefault = strstr(ChrPtr(EnvelopeTo), ChrPtr(Rcp)) != NULL; - else if (DefaultFrom != NULL) + else if (StrLength(DefaultFrom) > 0) VEA->IsDefault = !strcmp(ChrPtr(Rcp), ChrPtr(DefaultFrom)); else VEA->IsDefault = 0;