diff --git a/import/index_scripts/author.bsh b/import/index_scripts/author.bsh index c0cc4f1d1d9fe75cc768fdc43bd273349f236dd8..bfe5f7cd12c4b985ea20b65ee67ed78dbe5f4f65 100644 --- a/import/index_scripts/author.bsh +++ b/import/index_scripts/author.bsh @@ -375,9 +375,9 @@ public String processInitials(String authorName) { if (name.length() > 0) { String initial = name.substring(0,1); // if there is a hyphenated name, use both initials - if (name.indexOf('-') > 0) { - int pos = name.indexOf('-'); - String extra = name.substring(pos+1,pos+2); + int pos = name.indexOf('-'); + if (pos > 0 && pos < name.length() - 1) { + String extra = name.substring(pos+1, pos+2); initial = initial + " " + extra; } result += " " + initial;