File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -119,14 +119,16 @@ namespace Hekate {
119119 break ;
120120 }
121121
122- /* Reorder ini files by ASCII ordering. */
123- char temp[0x100 ];
124- for (size_t i = 0 ; i < count - 1 ; i++) {
125- for (size_t j = i + 1 ; j < count; j++) {
126- if (std::strcmp (dir_entries[i], dir_entries[j]) > 0 ) {
127- std::strcpy (temp, dir_entries[i]);
128- std::strcpy (dir_entries[i], dir_entries[j]);
129- std::strcpy (dir_entries[j], temp);
122+ if (count > 1 ) {
123+ /* Reorder ini files by ASCII ordering. */
124+ char temp[0x100 ];
125+ for (size_t i = 0 ; i < count - 1 ; i++) {
126+ for (size_t j = i + 1 ; j < count; j++) {
127+ if (std::strcmp (dir_entries[i], dir_entries[j]) > 0 ) {
128+ std::strcpy (temp, dir_entries[i]);
129+ std::strcpy (dir_entries[i], dir_entries[j]);
130+ std::strcpy (dir_entries[j], temp);
131+ }
130132 }
131133 }
132134 }
You can’t perform that action at this time.
0 commit comments