fix ase tag names pushed to wrong arena

This commit is contained in:
jacob 2024-04-03 01:47:57 -05:00
parent f78837ca8a
commit 13d927e752

View File

@ -814,7 +814,6 @@ struct ase_decode_sheet_result ase_decode_sheet(struct arena *arena, struct buff
{
__prof;
struct temp_arena scratch = scratch_begin(arena);
struct ase_decode_sheet_result res = { 0 };
struct byte_reader br = br_create_from_buffer(encoded);
@ -896,7 +895,7 @@ struct ase_decode_sheet_result ase_decode_sheet(struct arena *arena, struct buff
u8 *str_bytes = br_read_raw(&br, str_len);
tag->name = (struct string) {
str_len,
arena_push_array(scratch.arena, u8, str_len)
arena_push_array(arena, u8, str_len)
};
MEMCPY(tag->name.text, str_bytes, str_len);
++num_tags;
@ -919,8 +918,6 @@ struct ase_decode_sheet_result ase_decode_sheet(struct arena *arena, struct buff
/* ASSERT all data was read */
ASSERT(br_bytes_left(&br) == 0);
scratch_end(scratch);
res.image_size = V2(image_width, image_height);
res.frame_size = V2(frame_width, frame_height);
res.num_frames = num_frames;