Truncate varint to 32-bit integer. This reverts an unintentional change in CL 226346424 where on 32-bit platforms varint was implicitly truncated in some cases but not the others. gfe-relnote: n/a (only affects 32-bit platforms) PiperOrigin-RevId: 229679285 Change-Id: I962f50e90fd7273f3348f34240d14f5737c9fd12
diff --git a/http2/hpack/decoder/hpack_entry_decoder.cc b/http2/hpack/decoder/hpack_entry_decoder.cc index b227b18..96b9f06 100644 --- a/http2/hpack/decoder/hpack_entry_decoder.cc +++ b/http2/hpack/decoder/hpack_entry_decoder.cc
@@ -192,7 +192,7 @@ bool HpackEntryDecoder::DispatchOnType(HpackEntryDecoderListener* listener) { const HpackEntryType entry_type = entry_type_decoder_.entry_type(); - const uint64_t varint = entry_type_decoder_.varint(); + const uint32_t varint = static_cast<uint32_t>(entry_type_decoder_.varint()); switch (entry_type) { case HpackEntryType::kIndexedHeader: // The entry consists solely of the entry type and varint. See: