mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
rdi make: fix incorrect base encoding offset initialization when pushing into new location chunk
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
////////////////////////////////
|
||||
//~ rjf: API Implementation Helper Macros
|
||||
|
||||
#define RDIM_IdxedChunkListPush(arena, list, chunk_type, element_type, cap_value, result) \
|
||||
#define RDIM_IdxedChunkListPush(arena, list, chunk_type, element_type, cap_value, result, ...) \
|
||||
element_type *result = 0;\
|
||||
do\
|
||||
{\
|
||||
@@ -14,6 +14,7 @@ if(n == 0 || n->count >= n->cap)\
|
||||
n = rdim_push_array(arena, chunk_type, 1);\
|
||||
n->cap = cap_value;\
|
||||
n->base_idx = list->total_count;\
|
||||
__VA_ARGS__;\
|
||||
n->v = rdim_push_array_no_zero(arena, element_type, n->cap);\
|
||||
RDIM_SLLQueuePush(list->first, list->last, n);\
|
||||
list->chunk_count += 1;\
|
||||
@@ -1054,7 +1055,7 @@ rdim_encoded_size_from_location_info(RDIM_LocationInfo *info)
|
||||
RDI_PROC RDIM_Location *
|
||||
rdim_location_chunk_list_push_new(RDIM_Arena *arena, RDIM_LocationChunkList *list, RDI_U64 cap, RDIM_LocationInfo *info)
|
||||
{
|
||||
RDIM_IdxedChunkListPush(arena, list, RDIM_LocationChunkNode, RDIM_Location, cap, result);
|
||||
RDIM_IdxedChunkListPush(arena, list, RDIM_LocationChunkNode, RDIM_Location, cap, result, n->base_encoding_off = list->total_encoded_size);
|
||||
{
|
||||
RDI_U64 encoded_size = rdim_encoded_size_from_location_info(info);
|
||||
rdim_memcpy_struct(&result->info, info);
|
||||
|
||||
+2
-2
@@ -167,7 +167,7 @@ rdi_string_from_eval_op(Arena *arena, RDI_EvalOp op)
|
||||
switch(op)
|
||||
{
|
||||
default:{result = push_str8f(arena, "%#x", op);}break;
|
||||
#define X(name) case RDI_EvalOp_##name:{result = str8_lit("#name");}break;
|
||||
#define X(name) case RDI_EvalOp_##name:{result = str8_lit(#name);}break;
|
||||
RDI_EvalOp_XList
|
||||
#undef X
|
||||
}
|
||||
@@ -181,7 +181,7 @@ rdi_string_from_eval_type_group(Arena *arena, RDI_EvalTypeGroup eval_type_group)
|
||||
switch(eval_type_group)
|
||||
{
|
||||
default:{result = push_str8f(arena, "%#x", eval_type_group);}break;
|
||||
#define X(name) case RDI_EvalTypeGroup_##name:{result = str8_lit("#name");}break;
|
||||
#define X(name) case RDI_EvalTypeGroup_##name:{result = str8_lit(#name);}break;
|
||||
RDI_EvalTypeGroup_XList
|
||||
#undef X
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user