summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuna <luna@palmstonegames.com>2014-10-29 11:55:21 +0100
committerWouter van Oortmerssen <wvo@google.com>2014-10-29 10:42:10 -0700
commit118abc2871c05fb0b38b7fa8a3fe6278162e4b08 (patch)
treea67da74ea4d8b30981194268bb2be01ba130f19a
parentfbcf063401a5353cc8b7947e4ae44c29b4c344b3 (diff)
downloadflatbuffers-118abc2871c05fb0b38b7fa8a3fe6278162e4b08.tar.gz
flatbuffers-118abc2871c05fb0b38b7fa8a3fe6278162e4b08.tar.bz2
flatbuffers-118abc2871c05fb0b38b7fa8a3fe6278162e4b08.zip
Fix a build error on 32 bit go
Change-Id: Iac5894fd8f56da7e420714558a94d63d4fea2d72
-rw-r--r--go/builder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/go/builder.go b/go/builder.go
index 46543c8c..94e7e95a 100644
--- a/go/builder.go
+++ b/go/builder.go
@@ -152,7 +152,7 @@ func (b *Builder) EndObject() UOffsetT {
// Doubles the size of the byteslice, and copies the old data towards the
// end of the new byteslice (since we build the buffer backwards).
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")
}
newSize := len(b.Bytes) * 2