From dc61e932f5372cadf9182bbe0c82329d6be1e343 Mon Sep 17 00:00:00 2001 From: BrentVL-1952840 <70229620+Brentdevent@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:51:52 +0200 Subject: [PATCH] Fix incorrect mod data in getInfo --- src/client/component/workshop.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/component/workshop.cpp b/src/client/component/workshop.cpp index 4a859acb..8e61d906 100644 --- a/src/client/component/workshop.cpp +++ b/src/client/component/workshop.cpp @@ -203,6 +203,11 @@ namespace workshop std::string get_mod_resized_name(const std::string& dir_name) { + if (dir_name == "usermaps" || dir_name.empty()) + { + return dir_name; + } + std::string result = dir_name; for (unsigned int i = 0; i < *game::modsCount; ++i) @@ -246,7 +251,7 @@ namespace workshop std::string get_mod_publisher_id(const std::string& dir_name) { - if (dir_name == "usermaps") + if (dir_name == "usermaps" || dir_name.empty()) { return dir_name; }