X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fz80if.c;h=5efeff894d34d1499718021f26542d3156c1eb6d;hb=75bf03886e4acb87bd7922d42d828f56c5dbe4bb;hp=8db4aa5c31e08ca24fef16284229bf5e81311832;hpb=83b1fb32799d32d8bc94ffa676742c778302e85a;p=picodrive.git diff --git a/pico/z80if.c b/pico/z80if.c index 8db4aa5..5efeff8 100644 --- a/pico/z80if.c +++ b/pico/z80if.c @@ -121,8 +121,8 @@ static int z80_unpack_legacy(const void *data) } #elif defined(_USE_CZ80) if (*(int *)data == 0x00007a43) { // "Cz" save? - memcpy(&CZ80, data+8, offsetof(cz80_struc, BasePC)); - Cz80_Set_Reg(&CZ80, CZ80_PC, *(int *)(data+4)); + memcpy(&CZ80, (int*)data+8, offsetof(cz80_struc, BasePC)); + Cz80_Set_Reg(&CZ80, CZ80_PC, *(int *)((int*)data+4)); return 0; } #endif