From 446b3c13dc9d70b106154088b22284342b22a862 Mon Sep 17 00:00:00 2001 From: Redkale <8730487+redkale@users.noreply.github.com> Date: Thu, 19 Sep 2019 21:38:53 +0800 Subject: [PATCH] --- src/org/redkale/util/Utility.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/redkale/util/Utility.java b/src/org/redkale/util/Utility.java index 04e817743..d9d41e02d 100644 --- a/src/org/redkale/util/Utility.java +++ b/src/org/redkale/util/Utility.java @@ -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];