mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: fix 4 arrays out of bond
Gsdx: fix a memcpy src/dst overlap + a clang compilation fix git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5726 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e01c6cd9ce
commit
fb684df32b
|
@ -233,7 +233,8 @@ void Pcsx2Config::GSOptions::LoadSave( IniInterface& ini )
|
|||
IniEntry( FramerateNTSC );
|
||||
IniEntry( FrameratePAL );
|
||||
|
||||
static const wxChar * const ntsc_pal_str[2] = { L"ntsc", L"pal" };
|
||||
// WARNING: array must be NULL terminated to compute it size
|
||||
static const wxChar * const ntsc_pal_str[3] = { L"ntsc", L"pal", NULL };
|
||||
ini.EnumEntry( L"DefaultRegionMode", DefaultRegionMode, ntsc_pal_str, DefaultRegionMode );
|
||||
|
||||
IniEntry( FramesToDraw );
|
||||
|
|
|
@ -518,6 +518,8 @@ void App_LoadSaveInstallSettings( IniInterface& ini )
|
|||
{
|
||||
L"User",
|
||||
L"Custom",
|
||||
// WARNING: array must be NULL terminated to compute it size
|
||||
NULL
|
||||
};
|
||||
|
||||
ini.EnumEntry( L"DocumentsFolderMode", DocsFolderMode, DocsFolderModeNames, (InstallationMode == InstallMode_Registered) ? DocsFolder_User : DocsFolder_Custom);
|
||||
|
@ -822,6 +824,8 @@ void AppConfig::GSWindowOptions::LoadSave( IniInterface& ini )
|
|||
L"Stretch",
|
||||
L"4:3",
|
||||
L"16:9",
|
||||
// WARNING: array must be NULL terminated to compute it size
|
||||
NULL
|
||||
};
|
||||
|
||||
ini.EnumEntry( L"AspectRatio", AspectRatio, AspectRatioNames, AspectRatio );
|
||||
|
|
|
@ -323,6 +323,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// WARNING ConsoleLogSources & ConLogDefaults must have the same size
|
||||
static ConsoleLogSource* const ConLogSources[] =
|
||||
{
|
||||
(ConsoleLogSource*)&SysConsole.eeConsole,
|
||||
|
@ -335,6 +336,7 @@ static ConsoleLogSource* const ConLogSources[] =
|
|||
(ConsoleLogSource*)&pxConLog_Thread,
|
||||
};
|
||||
|
||||
// WARNING ConsoleLogSources & ConLogDefaults must have the same size
|
||||
static const bool ConLogDefaults[] =
|
||||
{
|
||||
true,
|
||||
|
@ -343,6 +345,8 @@ static const bool ConLogDefaults[] =
|
|||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
};
|
||||
|
||||
void ConLog_LoadSaveSettings( IniInterface& ini )
|
||||
|
|
|
@ -1062,7 +1062,8 @@ void GSTextureCache::Source::Flush(uint32 count)
|
|||
|
||||
if(count < m_write.count)
|
||||
{
|
||||
memcpy(&m_write.rect[0], &m_write.rect[count], (m_write.count - count) * sizeof(m_write.rect[0]));
|
||||
// Warning src and destination overlap. Memmove must be used instead of memcpy
|
||||
memmove(&m_write.rect[0], &m_write.rect[count], (m_write.count - count) * sizeof(m_write.rect[0]));
|
||||
}
|
||||
|
||||
m_write.count -= count;
|
||||
|
|
|
@ -71,6 +71,7 @@ typedef signed long long int64;
|
|||
#include <time.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <complex>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
Loading…
Reference in New Issue