From 70f94db208293a100b46bda90d6c9b6f720de6c1 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 15 Oct 2014 02:13:46 -0700 Subject: [PATCH] Fix some uninitialized reads --- src/gba/gba.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gba/gba.c b/src/gba/gba.c index 8516efa21..2a756b9d8 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -124,6 +124,7 @@ static void GBAInit(struct ARMCore* cpu, struct ARMComponent* component) { GBAInterruptHandlerInit(&cpu->irqh); GBAMemoryInit(gba); + GBASavedataInit(&gba->memory.savedata, 0); gba->video.p = gba; GBAVideoInit(&gba->video); @@ -151,6 +152,8 @@ static void GBAInit(struct ARMCore* cpu, struct ARMComponent* component) { gba->logLevel = GBA_LOG_INFO | GBA_LOG_WARN | GBA_LOG_ERROR | GBA_LOG_FATAL; gba->biosChecksum = GBAChecksum(gba->memory.bios, SIZE_BIOS); + + gba->busyLoop = -1; } void GBADestroy(struct GBA* gba) {