diff 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
line wrap: on
line diff
--- a/blastem.c	Thu Apr 30 23:21:23 2020 -0700
+++ b/blastem.c	Thu Apr 30 23:30:22 2020 -0700
@@ -158,8 +158,9 @@
 						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);
-							process_smd_block(*dst + offset, tmp, SMD_BLOCK_SIZE);
+							uint8_t *u8dst = *dst;
+							memcpy(tmp, u8dst + offset + SMD_HEADER_SIZE, SMD_BLOCK_SIZE);
+							process_smd_block((void *)(u8dst + offset), tmp, SMD_BLOCK_SIZE);
 						}
 						out_size = offset;
 					}