diff options
-rw-r--r-- | blastem.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -154,7 +154,7 @@ uint32_t load_rom_zip(const char *filename, void **dst) if (*dst) { if (is_smd_format(z->entries[i].name, *dst)) { size_t offset; - for (offset = 0; offset + SMD_BLOCK_SIZE + SMD_HEADER_SIZE < out_size; offset += SMD_BLOCK_SIZE) + for (offset = 0; offset + SMD_BLOCK_SIZE + SMD_HEADER_SIZE <= out_size; offset += SMD_BLOCK_SIZE) { uint8_t tmp[SMD_BLOCK_SIZE]; memcpy(tmp, *dst + offset + SMD_HEADER_SIZE, SMD_BLOCK_SIZE); |