From 13d927e752f21ee23f31e8c0e1e8e8a11fa398d0 Mon Sep 17 00:00:00 2001 From: jacob Date: Wed, 3 Apr 2024 01:47:57 -0500 Subject: [PATCH] fix ase tag names pushed to wrong arena --- src/ase.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ase.c b/src/ase.c index 0ff70920..fbac5e9e 100644 --- a/src/ase.c +++ b/src/ase.c @@ -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;