From 6529363ab5a5d1eb69da3d276de047723fd7d25a Mon Sep 17 00:00:00 2001 From: hrydgard Date: Fri, 20 Feb 2009 22:32:05 +0000 Subject: [PATCH] fix silly bug in ppctables when starting multiple games in the same dolphin session git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2324 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/PowerPC/PPCTables.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/PPCTables.cpp b/Source/Core/Core/Src/PowerPC/PPCTables.cpp index a0902618c6..c4518c6c1c 100644 --- a/Source/Core/Core/Src/PowerPC/PPCTables.cpp +++ b/Source/Core/Core/Src/PowerPC/PPCTables.cpp @@ -70,7 +70,7 @@ void Jit64::DynaRunTable31(UGeckoInstruction _inst) {(this->*dynaOpTable31[_inst void Jit64::DynaRunTable59(UGeckoInstruction _inst) {(this->*dynaOpTable59[_inst.SUBOP5 ])(_inst);} void Jit64::DynaRunTable63(UGeckoInstruction _inst) {(this->*dynaOpTable63[_inst.SUBOP10])(_inst);} -static GekkoOPInfo *m_allInstructions[2048]; +static GekkoOPInfo *m_allInstructions[512]; static int m_numInstructions; GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst) @@ -661,6 +661,7 @@ void InitTables() } } + m_numInstructions = 0; for (int i = 0; i < (int)(sizeof(primarytable) / sizeof(GekkoOPTemplate)); i++) m_allInstructions[m_numInstructions++] = &primarytable[i].opinfo; for (int i = 0; i < (int)(sizeof(table4_2) / sizeof(GekkoOPTemplate)); i++) @@ -681,7 +682,7 @@ void InitTables() m_allInstructions[m_numInstructions++] = &table63[i].opinfo; for (int i = 0; i < (int)(sizeof(table63_2) / sizeof(GekkoOPTemplate)); i++) m_allInstructions[m_numInstructions++] = &table63_2[i].opinfo; - if (m_numInstructions >= 2048) { + if (m_numInstructions >= 512) { PanicAlert("m_allInstructions underdimensioned"); } }