Incorrect buffer size check fixed.
This commit is contained in:
parent
7bcbb19569
commit
33e4ab65e9
|
@ -245,7 +245,7 @@ class Builder(object):
|
|||
def growByteBuffer(self):
|
||||
"""Doubles the size of the byteslice, and copies the old data towards
|
||||
the end of the new buffer (since we build the buffer backwards)."""
|
||||
if not len(self.Bytes) <= Builder.MAX_BUFFER_SIZE:
|
||||
if len(self.Bytes) == Builder.MAX_BUFFER_SIZE:
|
||||
msg = "flatbuffers: cannot grow buffer beyond 2 gigabytes"
|
||||
raise BuilderSizeError(msg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue