Skip to content

Commit

Permalink
Fix issue with map entry order
Browse files Browse the repository at this point in the history
  • Loading branch information
doyaGu committed Jan 30, 2025
1 parent d1af947 commit d5bf228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MapMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ bool MapMenu::ExploreMaps(MapEntry *maps, int depth) {
_findclose(handle);

std::sort(maps->children.begin(), maps->children.end(), [](const MapEntry *a, const MapEntry *b) {
return a->type > b->type;
return a->type < b->type || a->name < b->name;
});

return !maps->children.empty();
Expand Down
2 changes: 1 addition & 1 deletion src/MapMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class BMLMod;
class MapMenu;

enum MapEntryType {
MAP_ENTRY_DIR,
MAP_ENTRY_FILE,
MAP_ENTRY_DIR
};

struct MapEntry {
Expand Down

0 comments on commit d5bf228

Please sign in to comment.