Fixed long cast to int in flexbufferbuilder.java (#7059)

This commit is contained in:
Derek Bailey
2022-02-01 12:58:10 -08:00
committed by GitHub
parent bc901436db
commit e090d8da17

View File

@@ -763,7 +763,7 @@ public class FlexBuffersBuilder {
// Compute relative offset.
long offset = offsetLoc - iValue;
// Does it fit?
int bitWidth = widthUInBits((int) offset);
int bitWidth = widthUInBits(offset);
if (((1L) << bitWidth) == byteWidth)
return bitWidth;
}