Merge branch 'mjog/fix-ppc-test' into 'mainline'

Don't attempt to get the last initial if no other word

See merge request GNOME/geary!431
This commit is contained in:
Michael Gratton 2020-03-15 00:19:29 +00:00
commit e805ac5fc5

View file

@ -89,10 +89,12 @@ namespace Util.Avatar {
// Get the first alphanumeric char of the last word of the string
index = normalized.last_index_of_char(' ');
for (int i = 0; normalized.get_next_char(ref index, out c); i++) {
if (c.isalnum()) {
buf.append_unichar(c);
break;
if (index >= 0) {
for (int i = 0; normalized.get_next_char(ref index, out c); i++) {
if (c.isalnum()) {
buf.append_unichar(c);
break;
}
}
}