From d40c9edb9037839b42812c14c2b484cfee92633a Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Sat, 13 Jan 2024 21:13:29 -0800 Subject: [PATCH] type graph -> fix edge case of last-incrementally-changed type's members being considered out-of-bounds of member info --- src/type_graph/type_graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/type_graph/type_graph.c b/src/type_graph/type_graph.c index 0142cffd..b019a70e 100644 --- a/src/type_graph/type_graph.c +++ b/src/type_graph/type_graph.c @@ -318,7 +318,7 @@ tg_type_from_graph_raddbg_key(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg RADDBG_UDT *udt = &rdbg->udts[udt_idx]; members_count = udt->member_count; members = push_array(arena, TG_Member, members_count); - if(0 <= udt->member_first && udt->member_first+udt->member_count < rdbg->member_count) + if(members_count != 0 && 0 <= udt->member_first && udt->member_first+udt->member_count <= rdbg->member_count) { for(U32 member_idx = udt->member_first; member_idx < udt->member_first+udt->member_count;