Mercurial > repos > blastem
comparison blastem.c @ 1952:42c12d141f6e
Remove usage of GCC pointer arithmetic on void * extension
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 30 Apr 2020 23:30:22 -0700 |
parents | c3c62dbf1ceb |
children | 1c7af12efe8b |
comparison
equal
deleted
inserted
replaced
1951:8494fe8d6b65 | 1952:42c12d141f6e |
---|---|
156 if (is_smd_format(z->entries[i].name, *dst)) { | 156 if (is_smd_format(z->entries[i].name, *dst)) { |
157 size_t offset; | 157 size_t offset; |
158 for (offset = 0; offset + SMD_BLOCK_SIZE + SMD_HEADER_SIZE <= out_size; offset += SMD_BLOCK_SIZE) | 158 for (offset = 0; offset + SMD_BLOCK_SIZE + SMD_HEADER_SIZE <= out_size; offset += SMD_BLOCK_SIZE) |
159 { | 159 { |
160 uint8_t tmp[SMD_BLOCK_SIZE]; | 160 uint8_t tmp[SMD_BLOCK_SIZE]; |
161 memcpy(tmp, *dst + offset + SMD_HEADER_SIZE, SMD_BLOCK_SIZE); | 161 uint8_t *u8dst = *dst; |
162 process_smd_block(*dst + offset, tmp, SMD_BLOCK_SIZE); | 162 memcpy(tmp, u8dst + offset + SMD_HEADER_SIZE, SMD_BLOCK_SIZE); |
163 process_smd_block((void *)(u8dst + offset), tmp, SMD_BLOCK_SIZE); | |
163 } | 164 } |
164 out_size = offset; | 165 out_size = offset; |
165 } | 166 } |
166 free(ext); | 167 free(ext); |
167 zip_close(z); | 168 zip_close(z); |