mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-12 23:31:38 -07:00
correctly decompress rdis in radbin dumping path; do not compress zero-sized sections in rdi make
This commit is contained in:
@@ -1152,6 +1152,13 @@ rb_thread_entry_point(void *p)
|
||||
{
|
||||
RDI_Parsed rdi = {0};
|
||||
RDI_ParseStatus rdi_status = rdi_parse(f->data.str, f->data.size, &rdi);
|
||||
U64 decompressed_size = rdi_decompressed_size_from_parsed(&rdi);
|
||||
if(decompressed_size > rdi.raw_data_size)
|
||||
{
|
||||
U8 *decompressed_data = push_array_no_zero(arena, U8, decompressed_size);
|
||||
rdi_decompress_parsed(decompressed_data, decompressed_size, &rdi);
|
||||
rdi_status = rdi_parse(decompressed_data, decompressed_size, &rdi);
|
||||
}
|
||||
switch(rdi_status)
|
||||
{
|
||||
default:{}break;
|
||||
|
||||
@@ -2982,12 +2982,7 @@ rdim_compress(Arena *arena, RDIM_SerializedSectionBundle *in)
|
||||
RDIM_SerializedSection *src = &in->sections[k];
|
||||
RDIM_SerializedSection *dst = &out.sections[k];
|
||||
MemoryCopyStruct(dst, src);
|
||||
|
||||
// rjf: determine if this section should be compressed
|
||||
B32 should_compress = 1;
|
||||
|
||||
// rjf: compress if needed
|
||||
if(should_compress)
|
||||
if(src->encoded_size != 0)
|
||||
{
|
||||
MemoryZero(ctx.m_hashTable, sizeof(U16)*(1<<ctx.m_tableSizeBits));
|
||||
dst->data = push_array_no_zero(arena, U8, src->encoded_size);
|
||||
|
||||
Reference in New Issue
Block a user