From 85f7d2d065ff07c8e541e81ccb1df893d7c1bc1b Mon Sep 17 00:00:00 2001 From: Eric Salo Date: Fri, 7 Oct 2022 13:23:41 -0700 Subject: [PATCH] set kUpb_EncodedValue_MaxField to its correct value PiperOrigin-RevId: 479655389 --- upb/mini_table.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upb/mini_table.c b/upb/mini_table.c index 331ca7e8b9..0d7d82aea1 100644 --- a/upb/mini_table.c +++ b/upb/mini_table.c @@ -70,7 +70,7 @@ typedef enum { enum { kUpb_EncodedValue_MinField = ' ', - kUpb_EncodedValue_MaxField = 'K', + kUpb_EncodedValue_MaxField = 'I', kUpb_EncodedValue_MinModifier = 'L', kUpb_EncodedValue_MaxModifier = '[', kUpb_EncodedValue_End = '^', @@ -822,6 +822,9 @@ static const char* upb_MtDecoder_Parse(upb_MtDecoder* d, const char* ptr, kUpb_EncodedValue_MaxSkip, &skip); last_field_number += skip; last_field_number--; // Next field seen will increment. + } else { + upb_MtDecoder_ErrorFormat(d, "Invalid char: %c", ch); + UPB_UNREACHABLE(); } }