Fix warnings

This commit is contained in:
negativeExponent 2020-01-16 22:53:24 +08:00
parent ea7b02eaed
commit a0205b3ebd
2 changed files with 5 additions and 4 deletions

View File

@ -494,15 +494,16 @@ uint32_t load_rom_mem (const char *data, size_t size)
cart.size = size;
if (cart.size < 0x4000) cart.size = 0x4000;
cart.rom = malloc(cart.size);
memcpy (cart.rom, data, size);
cart.rom = malloc(cart.size);
/* Take care of image header, if present */
if ((cart.size / 512) & 1)
{
cart.size -= 512;
memcpy (cart.rom, cart.rom + 512, cart.size);
memcpy (cart.rom, data + 512, size - 512);
}
else
memcpy (cart.rom, data, size);
/* 16k pages */
cart.pages = cart.size / 0x4000;

View File

@ -327,7 +327,7 @@ void render_reset(void)
int32_t i;
/* Clear display bitmap */
memset(bitmap.data, 0, bitmap.pitch * bitmap.height);
memset(bitmap.data, 0, (long) bitmap.pitch * bitmap.height);
/* Clear palette */
for(i = 0; i < PALETTE_SIZE; i++)