mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-07 06:18:42 +00:00
fix enumerate parsing
This commit is contained in:
@@ -1774,10 +1774,11 @@ p2r_convert(Arena *arena, P2R_ConvertIn *in)
|
|||||||
{
|
{
|
||||||
dst_type->kind = RDI_TypeKind_Enum;
|
dst_type->kind = RDI_TypeKind_Enum;
|
||||||
dst_type->direct_type = direct_type;
|
dst_type->direct_type = direct_type;
|
||||||
|
dst_type->byte_size = direct_type ? direct_type->byte_size : 0;
|
||||||
dst_type->name = name;
|
dst_type->name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rjf: push revisit task for enumerates/size
|
// rjf: push revisit task for enumerates
|
||||||
if(!(lf->props & CV_TypeProp_FwdRef))
|
if(!(lf->props & CV_TypeProp_FwdRef))
|
||||||
{
|
{
|
||||||
P2R_TypeIdRevisitTask *t = push_array(scratch.arena, P2R_TypeIdRevisitTask, 1);
|
P2R_TypeIdRevisitTask *t = push_array(scratch.arena, P2R_TypeIdRevisitTask, 1);
|
||||||
@@ -2270,11 +2271,11 @@ p2r_convert(Arena *arena, P2R_ConvertIn *in)
|
|||||||
CV_LeafKind field_kind = *(CV_LeafKind *)read_ptr;
|
CV_LeafKind field_kind = *(CV_LeafKind *)read_ptr;
|
||||||
U64 field_leaf_header_size = cv_header_struct_size_from_leaf_kind(field_kind);
|
U64 field_leaf_header_size = cv_header_struct_size_from_leaf_kind(field_kind);
|
||||||
U8 *field_leaf_first = read_ptr+2;
|
U8 *field_leaf_first = read_ptr+2;
|
||||||
U8 *field_leaf_opl = field_leaf_first+field_leaf_header_size;
|
U8 *field_leaf_opl = field_leaf_first+range->hdr.size-2;
|
||||||
next_read_ptr = field_leaf_opl;
|
next_read_ptr = field_leaf_opl;
|
||||||
|
|
||||||
// rjf: skip out-of-bounds fields
|
// rjf: skip out-of-bounds fields
|
||||||
if(field_leaf_opl > field_list_opl)
|
if(field_leaf_first+field_leaf_header_size > field_list_opl)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user