diff options
author | Nassim <[email protected]> | 2019-09-02 00:18:35 +0200 |
---|---|---|
committer | Zach <[email protected]> | 2019-09-01 17:18:35 -0500 |
commit | 98e50a58ca65bdbc19201df1b70d75a3d4512bbc (patch) | |
tree | 322dee0951abcd2111ffee34ebf8ec61260d4e63 | |
parent | 60da3f17d6a37f45cd0d63e3484b2b3eb6c4f2c8 (diff) | |
download | Paper-98e50a58ca65bdbc19201df1b70d75a3d4512bbc.tar.gz Paper-98e50a58ca65bdbc19201df1b70d75a3d4512bbc.zip |
Fix sign line capping check (master) (#2525)
-rw-r--r-- | Spigot-Server-Patches/0414-Limit-Client-Sign-length-more.patch | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Spigot-Server-Patches/0414-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0414-Limit-Client-Sign-length-more.patch index ea9ca2a94c..bf238a5040 100644 --- a/Spigot-Server-Patches/0414-Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/0414-Limit-Client-Sign-length-more.patch @@ -41,7 +41,7 @@ index b193fbab47..188e450a13 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); + } + } |