aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-03-01 15:43:38 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-03-01 15:43:38 +0100
commit081a9404cdedc988b9ad56656da3d1bcbb999521 (patch)
treea47828234d3d48f185a4f3e71f34e3cd009ada9d
parentbb80642b7034a9cb43b95a7fa12a1f51eb947724 (diff)
downloadmblaze-081a9404cdedc988b9ad56656da3d1bcbb999521.tar.gz
blaze822: blaze822_addr: fix parsing of () at end of string
Found by lhynes.
-rw-r--r--blaze822.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blaze822.c b/blaze822.c
index 1076c60..f403d90 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -284,7 +284,7 @@ blaze822_addr(char *s, char **dispo, char **addro)
char *z = skip_comment(s);
if (!*disp && *addr) // user@host (name)
safe_append(disp, sizeof disp, s + 1,
- *z ? z - 1 : z);
+ *z ? z-1 : (*(z-1) == ')' ? z-1 : z));
else if (*disp) { // copy comment
safe_append_space(disp, sizeof disp);
safe_append(disp, sizeof disp, s, z);