pcsx2: extend the size of plugin m_info array to avoid out-of-bounds

Note: previous fix +1 wasn't enough.
This commit is contained in:
Gregory Hainaut 2015-09-25 21:00:16 +02:00
parent 78b73ba585
commit 037bd3109e
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,8 @@ enum PluginsEnum_t
// time. So it's placed afer PluginId_Count so that it doesn't show up in the conf // time. So it's placed afer PluginId_Count so that it doesn't show up in the conf
// screens or other plugin tables. // screens or other plugin tables.
PluginId_Mcd PluginId_Mcd,
PluginId_AllocCount // Extra value for correct array allocation
}; };
enum GamefixId enum GamefixId

View File

@ -298,8 +298,7 @@ protected:
volatile u32 m_mcdOpen; volatile u32 m_mcdOpen;
public: // hack until we unsuck plugins... public: // hack until we unsuck plugins...
// +1 to avoid out-of-bounds due to PluginId_Mcd which is above PluginId_Count ScopedPtr<PluginStatus_t> m_info[PluginId_AllocCount];
ScopedPtr<PluginStatus_t> m_info[PluginId_Count + 1];
public: public:
SysCorePlugins(); SysCorePlugins();