From fbd3bd438cc39fe48f3d450bc2e30ec68e61ef76 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 14 Oct 2010 05:41:05 +0000 Subject: [PATCH] fix bug in changelog and little memory leak --- desmume/ChangeLog | 2 +- desmume/src/armcpu.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/desmume/ChangeLog b/desmume/ChangeLog index 21efa1ed7..ddb761f5e 100644 --- a/desmume/ChangeLog +++ b/desmume/ChangeLog @@ -13,7 +13,7 @@ General/Core: bug: rewrite IPC/GX FIFO, IRQ flag generation, and wait-for-IRQ logics bug: rewrite RTC calendar handling; now supports years > 2038 enh: auto-DLDI patching for homebrew - enh: --gbaslot=self mounts self.nds in slot2 + enh: --gbaslot-rom=self mounts self.nds in slot2 enh: more realistic exception handling enh: piano controller emulation enh: modular slot-1 system for exact emulation of homebrew cards diff --git a/desmume/src/armcpu.cpp b/desmume/src/armcpu.cpp index 3f0750744..79a74177b 100644 --- a/desmume/src/armcpu.cpp +++ b/desmume/src/armcpu.cpp @@ -215,8 +215,6 @@ void armcpu_t::changeCPSR() void armcpu_init(armcpu_t *armcpu, u32 adr) { - u32 i; - armcpu->LDTBit = (armcpu->proc_ID==0); //Si ARM9 utiliser le syte v5 pour le load armcpu->intVector = 0xFFFF0000 * (armcpu->proc_ID==0); armcpu->waitIRQ = FALSE; @@ -227,12 +225,12 @@ void armcpu_init(armcpu_t *armcpu, u32 adr) // armcpu->irq_flag = 0; //#endif - for(i = 0; i < 15; ++i) + for(int i = 0; i < 16; ++i) { armcpu->R[i] = 0; if(armcpu->coproc[i]) free(armcpu->coproc[i]); armcpu->coproc[i] = NULL; - } + } armcpu->CPSR.val = armcpu->SPSR.val = SYS;