Fix items with name longer than then sign can handle

This commit is contained in:
Andrzej Pomirski 2014-02-10 12:03:13 +01:00
parent 5f67cadc11
commit d51f52af9e

View File

@ -51,7 +51,7 @@ public class ItemChecker implements Listener {
String[] parts = itemCode.split("(?=:|-|#)", 2);
String data = (parts.length > 1 ? parts[1] : "");
if (!data.isEmpty() && code.length() > (MAXIMUM_SIGN_LETTERS - data.length())) {
if (code.length() > (MAXIMUM_SIGN_LETTERS - data.length())) {
code = code.substring(0, MAXIMUM_SIGN_LETTERS - data.length());
}