Skip to content

Commit

Permalink
Fix for an outoufbound index access
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Nov 27, 2019
1 parent d094ec1 commit ba144d4
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ private boolean shortened(String[]nameParts, String[][] otherNames) {
if (nameParts[i].length() > 1) {
nameParts[i] = nameParts[i].substring(0, 1);
for (String[] other: otherNames) {
if (other.length <= i)
continue;
if (other[i] == null || other[i].length() < 2)
return false; // this may happen if synonyms map the name to a shorter version, my solution is to stop processing (cheap?)
other[i] = other[i].substring(0, 1);
Expand Down

0 comments on commit ba144d4

Please sign in to comment.