-/* $Cambridge: exim/src/src/expand.c,v 1.39 2005/08/01 15:01:12 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.41 2005/08/23 08:46:33 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
s = find_header(US"reply-to:", exists_only, newsize, FALSE,
headers_charset);
if (s == NULL || *s == 0)
+ {
+ *newsize = 0; /* For the *s==0 case */
s = find_header(US"from:", exists_only, newsize, FALSE, headers_charset);
+ }
return (s == NULL)? US"" : s;
/* A recipients list is available only during system message filtering,
int x = eval_term(&s, decimal, error);
if (*error == NULL)
{
- while (*s == '*' || *s == '/')
+ while (*s == '*' || *s == '/' || *s == '%')
{
int op = *s++;
int y = eval_term(&s, decimal, error);
if (*error != NULL) break;
- if (op == '*') x *= y; else x /= y;
+ if (op == '*') x *= y;
+ else if (op == '/') x /= y;
+ else x %= y;
}
}
*sptr = s;