Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 078f6dd6 authored by Hai Zhang's avatar Hai Zhang
Browse files

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
parent fbef48e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment