This commit is contained in:
Redkale
2019-09-19 21:38:53 +08:00
parent 3951e28148
commit 446b3c13dc

View File

@@ -1959,7 +1959,7 @@ public final class Utility {
char[] chars = text;
final int limit = start + len;
int remain = buffer.remaining();
final ByteBuffer buffer2 = remain >= bytesLength ? null : ByteBuffer.allocate(bytesLength - remain + 3); //最差情况buffer最后两byte没有填充
final ByteBuffer buffer2 = remain >= bytesLength ? null : ByteBuffer.allocate(bytesLength - remain + 4); //最差情况buffer最后两byte没有填充
ByteBuffer buf = buffer;
for (int i = start; i < limit; i++) {
c = chars[i];