clean up bounds checking for SIDEVICE_ENUM

This commit is contained in:
Calvin Cochran authored and Calvin Cochran committed 2016-08-08 12:33:08 -05:00
1 parent 1ab99ee22c
commit ba45a5999f
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -287,7 +287,7 @@ bool BootCore(const std::string& _rFilename)
{
int source;
controls_section->Get(StringFromFormat("PadType%u", i), &source, -1);
if (source >= (int)SIDEVICE_NONE && source <= (int)SIDEVICE_WIIU_ADAPTER)
if (source >= SIDEVICE_NONE && source < SIDEVICE_COUNT)
{
SConfig::GetInstance().m_SIDevice[i] = (SIDevices)source;
config_cache.bSetPads[i] = true;