diff options
author | Aikar <[email protected]> | 2018-11-17 00:39:22 -0500 |
---|---|---|
committer | Aikar <[email protected]> | 2018-11-17 00:39:22 -0500 |
commit | a62a77885daf150a68dca949561eb83b88a302f4 (patch) | |
tree | 4ab547333b8798225975726aac789f5b293b194e /Spigot-Server-Patches | |
parent | 07c797387b4f78d7d82b1a709e503db835c95f6b (diff) | |
download | Paper-a62a77885daf150a68dca949561eb83b88a302f4.tar.gz Paper-a62a77885daf150a68dca949561eb83b88a302f4.zip |
Specify charset explicitly on getBytes
Diffstat (limited to 'Spigot-Server-Patches')
-rw-r--r-- | Spigot-Server-Patches/0369-Limit-Book-Sizes.patch | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Spigot-Server-Patches/0369-Limit-Book-Sizes.patch b/Spigot-Server-Patches/0369-Limit-Book-Sizes.patch index 147d39fdfb..8ec9027669 100644 --- a/Spigot-Server-Patches/0369-Limit-Book-Sizes.patch +++ b/Spigot-Server-Patches/0369-Limit-Book-Sizes.patch @@ -38,7 +38,7 @@ index edd7ba353d..4c35132892 100644 + long byteAllowed = maxBookPageSize; + for (int i = 0; i < pageList.size(); ++i) { + String testString = pageList.getString(i); -+ int byteLength = testString.getBytes().length; ++ int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; + byteTotal += byteLength; + if (byteTotal > byteAllowed) { + PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); |