Fix a build error on 32 bit go
Change-Id: Iac5894fd8f56da7e420714558a94d63d4fea2d72
This commit is contained in:
parent
fbcf063401
commit
118abc2871
|
@ -152,7 +152,7 @@ func (b *Builder) EndObject() UOffsetT {
|
||||||
// Doubles the size of the byteslice, and copies the old data towards the
|
// Doubles the size of the byteslice, and copies the old data towards the
|
||||||
// end of the new byteslice (since we build the buffer backwards).
|
// end of the new byteslice (since we build the buffer backwards).
|
||||||
func (b *Builder) growByteBuffer() {
|
func (b *Builder) growByteBuffer() {
|
||||||
if (len(b.Bytes) & 0xC0000000) != 0 {
|
if (int64(len(b.Bytes)) & int64(0xC0000000)) != 0 {
|
||||||
panic("cannot grow buffer beyond 2 gigabytes")
|
panic("cannot grow buffer beyond 2 gigabytes")
|
||||||
}
|
}
|
||||||
newSize := len(b.Bytes) * 2
|
newSize := len(b.Bytes) * 2
|
||||||
|
|
Loading…
Reference in New Issue