Put default configs closer to the bottom

This commit is contained in:
Paul Dino Jones 2024-09-04 16:22:36 -04:00
parent 1ffbd84721
commit 9f45697564
1 changed files with 5 additions and 2 deletions

View File

@ -197,7 +197,7 @@ int getconfigtouse(const char* config_file_str, char* car, int sim)
{ {
return 0; return 0;
} }
int confignum = 0; int confignum = configs-1;
slogt("Multiple configs found"); slogt("Multiple configs found");
for (j = 0; j < configs; j++) for (j = 0; j < configs; j++)
{ {
@ -223,8 +223,11 @@ int getconfigtouse(const char* config_file_str, char* car, int sim)
slogt("matched default car"); slogt("matched default car");
confignum = j; confignum = j;
} }
if(confignum<configs-1)
{
break; break;
} }
}
return confignum; return confignum;
} }