correctly decompress rdis in radbin dumping path; do not compress zero-sized sections in rdi make

This commit is contained in:
Ryan Fleury
2025-10-13 12:47:46 -07:00
parent 87edc583bf
commit ec39cefc9e
2 changed files with 8 additions and 6 deletions
+1 -6
View File
@@ -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);