Archiviert
13
0

Fix sign line capping check (#2522)

Dieser Commit ist enthalten in:
Nassim 2019-09-02 00:21:08 +02:00 committet von Zach
Ursprung b2758246c8
Commit 26f644c554

Datei anzeigen

@ -41,7 +41,7 @@ index 6030766099..b030269f0a 100644
+ if (MAX_SIGN_LINE_LENGTH > 0 && astring[i].length() > MAX_SIGN_LINE_LENGTH) {
+ // This handles multibyte characters as 1
+ int offset = astring[i].codePoints().limit(MAX_SIGN_LINE_LENGTH).map(Character::charCount).sum();
+ if (offset > astring.length) {
+ if (offset < astring[i].length()) {
+ astring[i] = astring[i].substring(0, offset);
+ }
+ }