From b015e8d96b6a51a29791b08db7edad71635381a2 Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Sun, 1 Oct 2023 19:06:13 +0200 Subject: [PATCH] Small fix --- src/client/component/motd.cpp | 2 +- src/client/component/patches.cpp | 3 ++- src/client/component/ui_scripting.cpp | 7 +------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/client/component/motd.cpp b/src/client/component/motd.cpp index ca557353..b63bc3dc 100644 --- a/src/client/component/motd.cpp +++ b/src/client/component/motd.cpp @@ -154,7 +154,7 @@ namespace motd { const auto& image = image_data.value(); console::debug("Downloaded featured tab image %i\n", index); - images::override_texture(image_name + std::format("_{}", index), image); + images::override_texture(std::format("{}_{}", image_name, index), image); } }; diff --git a/src/client/component/patches.cpp b/src/client/component/patches.cpp index 195c66f5..ffc6abe1 100644 --- a/src/client/component/patches.cpp +++ b/src/client/component/patches.cpp @@ -79,8 +79,9 @@ namespace patches public: void post_unpack() override { - // Fix startup crash (bnet) + // Fix startup crashes utils::hook::set(0x140272F70, 0xC301B0); + utils::hook::jump(0x140046148, sub_46148); // Fix shutdown crash utils::hook::jump(0x1408B1CD0, 0x1408B1BA0); diff --git a/src/client/component/ui_scripting.cpp b/src/client/component/ui_scripting.cpp index f2199917..3bffdf29 100644 --- a/src/client/component/ui_scripting.cpp +++ b/src/client/component/ui_scripting.cpp @@ -364,12 +364,7 @@ namespace ui_scripting { const auto links = motd::get_links(); const auto link = links.find(name); - if (link == links.end()) - { - return false; - } - - return true; + return link != links.end(); }; lua["string"]["escapelocalization"] = [](const std::string& str)