Skip to content

Commit

Permalink
Fix a minor off-by-one error found in review.
Browse files Browse the repository at this point in the history
  • Loading branch information
diyelectromusic committed Dec 30, 2023
1 parent 7a9dd25 commit e49a410
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/performanceconfig.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//
// performanceconfig.cpp
//
Expand Down Expand Up @@ -982,7 +981,7 @@ bool CPerformanceConfig::ListPerformances()
Result = f_findfirst (&Directory, &FileInfo, PerfDir.c_str(), "*.ini");
for (unsigned i = 0; Result == FR_OK && FileInfo.fname[0]; i++)
{
if (m_nLastPerformance >= NUM_PERFORMANCES) {
if (m_nLastPerformance >= NUM_PERFORMANCES - 1) {
LOGNOTE ("Skipping performance %s", FileInfo.fname);
} else {
if (!(FileInfo.fattrib & (AM_HID | AM_SYS)))
Expand Down

0 comments on commit e49a410

Please sign in to comment.