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 8738d0c commit a9101fdCopy full SHA for a9101fd
sql/byte_buffer.go
@@ -41,10 +41,10 @@ func NewByteBuffer(initCap int) *ByteBuffer {
41
// they expect to be protected.
42
func (b *ByteBuffer) Grow(n int) {
43
newI := b.i
44
- if b.i+n <= cap(b.buf) {
+ if b.i+n < cap(b.buf) {
45
// Increment |b.i| if no alloc
46
newI += n
47
- } else if b.i+n >= cap(b.buf) {
+ } else {
48
// No more space, double.
49
// An external allocation doubled the cap using the size of
50
// the override object, which if used could lead to overall
0 commit comments