Skip to content
Snippets Groups Projects
Commit 19b6a1b1 authored by Demian Katz's avatar Demian Katz
Browse files

Fixed out-of-range error.

- Resolves VUFIND-1183.
parent a70beca1
No related merge requests found
......@@ -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;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment