sendmail: fix parsing of addresses in angle brackets
Pointer e needs to be wound back in order to overwrite '>' with '\0'.
Regression introduced in 20077c1429
Signed-off-by: Raffaello D. Di Napoli <rafdev@dinapo.li>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index 4ca91fa..0170f28 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -173,7 +173,7 @@
char *s, *e;
e = trim(str);
- if (e != str && e[-1] == '>') {
+ if (e != str && *--e == '>') {
s = strrchr(str, '<');
if (s) {
*e = '\0';