From e49a410d7eb858350e10ccaf64e3374f6bffcec8 Mon Sep 17 00:00:00 2001 From: Kevin <68612569+diyelectromusic@users.noreply.github.com> Date: Sat, 30 Dec 2023 09:20:22 -0800 Subject: [PATCH] Fix a minor off-by-one error found in review. --- src/performanceconfig.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index d6f59bd..b36dfea 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -1,4 +1,3 @@ - // // performanceconfig.cpp // @@ -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)))