Don't attempt to get the last initial if no other word
Fixs a test failure s390, powerpc. See #512, #724
This commit is contained in:
parent
bc0c31d962
commit
819f13fb3b
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