From 30951524da0f4ed95daa04dffe6f9e8607fe74e6 Mon Sep 17 00:00:00 2001 From: offtkp Date: Sat, 10 Aug 2024 20:20:12 +0300 Subject: [PATCH] Whoops, use j instead of i --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 0d3f6a6f6..22f049e39 100644 --- a/src/main.c +++ b/src/main.c @@ -1703,9 +1703,9 @@ uint32_t retro_achievements_read_memory_callback(uint32_t address, uint8_t* buff const rc_memory_regions_t* regions = rc_console_memory_regions(RC_CONSOLE_GAMEBOY_ADVANCE); for (int i=0;inum_regions;i++) { const rc_memory_region_t* region = ®ions->region[i]; - if (address >= region->start_address && address < region->end_address) { + if (address >= region->start_address && address <= region->end_address) { for(int j=0;jreal_address+(address-region->start_address)+i); + buffer[j]=gba_read8(&core.gba,region->real_address+(address-region->start_address)+j); } return num_bytes; } @@ -1715,9 +1715,9 @@ uint32_t retro_achievements_read_memory_callback(uint32_t address, uint8_t* buff const rc_memory_regions_t* regions = rc_console_memory_regions(RC_CONSOLE_NINTENDO_DS); for (int i=0;inum_regions;i++) { const rc_memory_region_t* region = ®ions->region[i]; - if (address >= region->start_address && address < region->end_address) { + if (address >= region->start_address && address <= region->end_address) { for(int j=0;jreal_address+(address-region->start_address)+i); + buffer[j]=nds9_read8(&core.nds,region->real_address+(address-region->start_address)+j); } } }