Skip to content

Commit

Permalink
opl.c fix loop conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Aug 5, 2021
1 parent 2d33337 commit 44c36c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opl.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ config_set_t *oplGetLegacyAppsConfig(void)
return appConfig;
}

for (i = MODE_COUNT; i >= 0; i--) {
for (i = MODE_COUNT - 1; i >= 0; i--) {
listSupport = list_support[i].support;
if ((listSupport != NULL) && (listSupport->enabled) && (listSupport->itemGetLegacyAppsPath != NULL)) {
listSupport->itemGetLegacyAppsPath(appsPath, sizeof(appsPath));
Expand Down Expand Up @@ -561,7 +561,7 @@ config_set_t *oplGetLegacyAppsInfo(char *name)
config_set_t *appConfig;
char appsPath[128];

for (i = MODE_COUNT; i >= 0; i--) {
for (i = MODE_COUNT - 1; i >= 0; i--) {
listSupport = list_support[i].support;
if ((listSupport != NULL) && (listSupport->enabled) && (listSupport->itemGetLegacyAppsInfo != NULL)) {
listSupport->itemGetLegacyAppsInfo(appsPath, sizeof(appsPath), name);
Expand Down

0 comments on commit 44c36c6

Please sign in to comment.