* entry (largest number) matching the given pattern.
*/
if (config->entry_default_pattern) {
- for (i = config->entry_count-1; i >= 0; i--) {
+ i = config->entry_count;
+ while (i--) {
if (config->entries[i]->no_autoselect)
continue;
if (MetaiMatch(config->entries[i]->file, config->entry_default_pattern)) {
}
/* select the last entry */
- for (i = config->entry_count-1; i >= 0; i--) {
+ i = config->entry_count;
+ while (i--) {
if (config->entries[i]->no_autoselect)
continue;
config->idx_default = i;