From 7f1805dcc7fd3de1e165c3959c8f9ca1bc916f9b Mon Sep 17 00:00:00 2001 From: rogerman Date: Tue, 30 Jul 2013 00:09:55 +0000 Subject: [PATCH] NDSSystem: - Fix compiler error for Clang (and possibly others): "goto into protected scope". (Regression from r4696.) --- desmume/src/NDSSystem.cpp | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 8e779c77e..7e18e3dde 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -2621,27 +2621,29 @@ void NDS_Reset() // Create the dummy firmware NDS_CreateDummyFirmware(&CommonSettings.fw_config); - - //copy the arm9 program to the address specified by rom header - u32 src = header->ARM9src; - u32 dst = header->ARM9cpy; - for(u32 i = 0; i < (header->ARM9binSize>>2); ++i) + { - _MMU_write32(dst, T1ReadLong(MMU.CART_ROM, src)); - dst += 4; - src += 4; - } + //copy the arm9 program to the address specified by rom header + u32 src = header->ARM9src; + u32 dst = header->ARM9cpy; + for(u32 i = 0; i < (header->ARM9binSize>>2); ++i) + { + _MMU_write32(dst, T1ReadLong(MMU.CART_ROM, src)); + dst += 4; + src += 4; + } - //copy the arm7 program to the address specified by rom header - src = header->ARM7src; - dst = header->ARM7cpy; - for(u32 i = 0; i < (header->ARM7binSize>>2); ++i) - { - _MMU_write32(dst, T1ReadLong(MMU.CART_ROM, src)); - dst += 4; - src += 4; + //copy the arm7 program to the address specified by rom header + src = header->ARM7src; + dst = header->ARM7cpy; + for(u32 i = 0; i < (header->ARM7binSize>>2); ++i) + { + _MMU_write32(dst, T1ReadLong(MMU.CART_ROM, src)); + dst += 4; + src += 4; + } } - + //set the cpus to an initial state with their respective programs entrypoints armcpu_init(&NDS_ARM7, header->ARM7exe); armcpu_init(&NDS_ARM9, header->ARM9exe);