Skip to content

Commit

Permalink
sort packs in PacksManager::assemble
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailRis committed Feb 1, 2025
1 parent e5f9efd commit 3fb16ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/content/PacksManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <queue>
#include <sstream>
#include <algorithm>

#include "util/listutil.hpp"

Expand Down Expand Up @@ -124,7 +125,9 @@ std::vector<std::string> PacksManager::assemble(
std::queue<const ContentPack*> queue;
std::queue<const ContentPack*> queue2;

for (auto& name : names) {
std::sort(allNames.begin(), allNames.end());

for (auto& name : allNames) {
auto found = packs.find(name);
if (found == packs.end()) {
throw contentpack_error(name, fs::path(""), "pack not found");
Expand Down

0 comments on commit 3fb16ab

Please sign in to comment.