mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 16:58:07 +00:00
Fix a build error on 32 bit go
Change-Id: Iac5894fd8f56da7e420714558a94d63d4fea2d72
This commit is contained in:
committed by
Wouter van Oortmerssen
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
|
||||||
|
|||||||
Reference in New Issue
Block a user