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:
commit
e805ac5fc5
1 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue