mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-01 16:53:57 +00:00
Fixed long cast to int in flexbufferbuilder.java (#7059)
This commit is contained in:
@@ -763,7 +763,7 @@ public class FlexBuffersBuilder {
|
|||||||
// Compute relative offset.
|
// Compute relative offset.
|
||||||
long offset = offsetLoc - iValue;
|
long offset = offsetLoc - iValue;
|
||||||
// Does it fit?
|
// Does it fit?
|
||||||
int bitWidth = widthUInBits((int) offset);
|
int bitWidth = widthUInBits(offset);
|
||||||
if (((1L) << bitWidth) == byteWidth)
|
if (((1L) << bitWidth) == byteWidth)
|
||||||
return bitWidth;
|
return bitWidth;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user