summaryrefslogtreecommitdiff
path: root/blastem.c
diff options
context:
space:
mode:
Diffstat (limited to 'blastem.c')
-rw-r--r--blastem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blastem.c b/blastem.c
index d5dcf7c..a80e99e 100644
--- a/blastem.c
+++ b/blastem.c
@@ -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);