From 5d13ccbe3fee5da63b109726b9ec00cb2f0ec404 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 21 Sep 2017 10:24:50 +0300 Subject: [PATCH] [Core/SVP] fix pointer arithmetic on 64bit (#171) I don't want broken version of my code to linger around. --- core/cart_hw/svp/ssp16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cart_hw/svp/ssp16.c b/core/cart_hw/svp/ssp16.c index f2f648c..5079a3d 100644 --- a/core/cart_hw/svp/ssp16.c +++ b/core/cart_hw/svp/ssp16.c @@ -219,7 +219,7 @@ #define IJind (((op>>6)&4)|(op&3)) #define GET_PC() (PC - (unsigned short *)svp->iram_rom) -#define GET_PPC_OFFS() ((unsigned int)PC - (unsigned int)svp->iram_rom - 2) +#define GET_PPC_OFFS() ((unsigned char *)PC - svp->iram_rom - 2) #define SET_PC(d) PC = (unsigned short *)svp->iram_rom + d #define REG_READ(r) (((r) <= 4) ? ssp->gr[r].byte.h : read_handlers[r]())