1
0
mirror of https://github.com/TASVideos/desmume synced 2024-07-08 20:06:04 +00:00

Fix potential index out of bounds

This commit is contained in:
Johan Mattsson 2023-08-06 00:35:40 +02:00 committed by GitHub
parent 357ff8a2c5
commit ca799e60b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ void slot2_Reset()
bool slot2_Change(NDS_SLOT2_TYPE changeToType)
{
if (changeToType > NDS_SLOT2_COUNT || changeToType < 0)
if (changeToType >= NDS_SLOT2_COUNT || changeToType < 0)
return false;
if (slot2_device_type == changeToType)