Skip to content

Commit

Permalink
Merge pull request nesbox#1964 from soxfox42/main
Browse files Browse the repository at this point in the history
Fix loading full-size BINARY chunks
  • Loading branch information
nesbox authored Jun 23, 2022
2 parents c6d93b0 + 0c77877 commit 323ed1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cart.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static const u8 Waveforms[] = {0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0

static s32 chunkSize(const Chunk* chunk)
{
return chunk->size == 0 && chunk->type == CHUNK_CODE ? TIC_BANK_SIZE : retro_le_to_cpu16(chunk->size);
return chunk->size == 0 && (chunk->type == CHUNK_CODE || chunk->type == CHUNK_BINARY) ? TIC_BANK_SIZE : retro_le_to_cpu16(chunk->size);
}

void tic_cart_load(tic_cartridge* cart, const u8* buffer, s32 size)
Expand Down

0 comments on commit 323ed1f

Please sign in to comment.