From 74d1a8647345f47642c99a02003460356fb19a59 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 6 Mar 2022 20:32:36 -0800 Subject: [PATCH] Fixed predicate to compare integers rather than pointers. --- upb/mini_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upb/mini_table.c b/upb/mini_table.c index a49ac5808c..354e7e5ac3 100644 --- a/upb/mini_table.c +++ b/upb/mini_table.c @@ -648,7 +648,7 @@ int upb_MtDecoder_CompareFields(const void* _a, const void* _b) { uint32_t b_packed = UPB_COMBINE(b->rep, b->type, b->field_index); assert(a_packed != b_packed); #undef UPB_COMBINE - return a < b ? -1 : 1; + return a_packed < b_packed ? -1 : 1; } static bool upb_MtDecoder_SortLayoutItems(upb_MtDecoder* d) {