Fix FastDataOutput.writeInternedUTF() when over 65534 strings.
The existing code casts mStringRefs.size() to short before comparing it with 65535, so that the comparison will always evaluate to be smaller even when the size is actually bigger. Instead of trying to play around with short and int conversion, it's more reliable and future-proof to simply represent unsigned short as int - writeShort() is already accepting int instead of short anyway. Bug: 243194720 Test: presubmit Change-Id: Ia2738db57773fa21059b24cc875c07f8facec3c5
Loading
Please register or sign in to comment