Commit Diff


commit - 54c39596938ae6d19fe5eede072d36a3f61baa12
commit + e6b8b8905c5a1967c31bf6b8abed6d6b05fbff14
blob - 08cf77f7a05719d158b1827f0afc279321117475
blob + b39c45d7a3b0afb03d2aa58d8de523c49e7e800a
--- tog/tog.c
+++ tog/tog.c
@@ -1308,14 +1308,12 @@ static const struct got_error *
 format_author(wchar_t **wauthor, int *author_width, char *author, int limit,
     int col_tab_align)
 {
-	char *smallerthan, *at;
+	char *smallerthan;
 
 	smallerthan = strchr(author, '<');
 	if (smallerthan && smallerthan[1] != '\0')
 		author = smallerthan + 1;
-	at = strchr(author, '@');
-	if (at)
-		*at = '\0';
+	author[strcspn(author, "@>")] = '\0';
 	return format_line(wauthor, author_width, author, limit, col_tab_align);
 }