We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10d05f3 commit ceb2eddCopy full SHA for ceb2edd
src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
@@ -44,7 +44,8 @@ class TastyBuffer(initialSize: Int) {
44
45
/** Write a byte of data. */
46
def writeByte(b: Int): Unit = {
47
- if (length == bytes.length) bytes = dble(bytes)
+ if (length >= bytes.length)
48
+ bytes = dble(bytes)
49
bytes(length) = b.toByte
50
length += 1
51
}
@@ -116,6 +117,8 @@ class TastyBuffer(initialSize: Int) {
116
117
def putNat(at: Addr, x: Int, width: Int): Unit = {
118
var y = x
119
var w = width
120
+ if(at.index + w >= bytes.length)
121
122
var digit = y & 0x7f | 0x80
123
while (w > 0) {
124
w -= 1
0 commit comments