Fix potential index out of bounds
This commit is contained in:
parent
357ff8a2c5
commit
ca799e60b7
|
@ -106,7 +106,7 @@ void slot2_Reset()
|
||||||
|
|
||||||
bool slot2_Change(NDS_SLOT2_TYPE changeToType)
|
bool slot2_Change(NDS_SLOT2_TYPE changeToType)
|
||||||
{
|
{
|
||||||
if (changeToType > NDS_SLOT2_COUNT || changeToType < 0)
|
if (changeToType >= NDS_SLOT2_COUNT || changeToType < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (slot2_device_type == changeToType)
|
if (slot2_device_type == changeToType)
|
||||||
|
|
Loading…
Reference in New Issue