Fix potential index out of bounds

This commit is contained in:
Johan Mattsson 2023-08-06 00:20:22 +02:00 committed by GitHub
parent 402e9f0a31
commit 357ff8a2c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ bool slot2_Change(NDS_SLOT2_TYPE changeToType)
void slot2_setDeviceByType(NDS_SLOT2_TYPE theType)
{
if (theType > NDS_SLOT2_COUNT || theType < 0)
if (theType >= NDS_SLOT2_COUNT || theType < 0)
{
return;
}