Skip to content

Commit 494b0bc

Browse files
committed
Fix #61 redundant growing of internal char buffer when parsing of ASCII chars from InputStream
1 parent b74d28c commit 494b0bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonReader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,7 @@ final class JsonReader private[jsoniter_scala](
25212521
} else parseEncodedString(i, charBuf.length - 1, charBuf, pos)
25222522
} else if (pos >= tail) {
25232523
val newPos = loadMoreOrError(pos)
2524-
parseString(i, Math.min(minLim, i + tail - newPos), charBuf, newPos)
2524+
parseString(i, Math.min(charBuf.length, i + tail - newPos), charBuf, newPos)
25252525
} else parseString(i, Math.min(growCharBuf(i + 1), i + tail - pos), this.charBuf, pos)
25262526

25272527
@tailrec

0 commit comments

Comments
 (0)