diff --git a/CMake/Tests.cmake b/CMake/Tests.cmake index 51f0033df..bb37b85b5 100644 --- a/CMake/Tests.cmake +++ b/CMake/Tests.cmake @@ -143,6 +143,7 @@ if(DEVILUTIONX_SCREENSHOT_FORMAT STREQUAL DEVILUTIONX_SCREENSHOT_FORMAT_PNG AND DevilutionX::SDL GTest::gmock GTest::gtest + fmt::fmt tl app_fatal_for_testing language_for_testing diff --git a/Source/levels/drlg_l2.cpp b/Source/levels/drlg_l2.cpp index e59db21af..716f907be 100644 --- a/Source/levels/drlg_l2.cpp +++ b/Source/levels/drlg_l2.cpp @@ -2064,6 +2064,9 @@ void FixTilesPatterns() if (dungeon[i][j] == 11 && dungeon[i + 1][j] == 14) { dungeon[i + 1][j] = 16; } + if (dungeon[i][j] == 15 && dungeon[i][j + 1] == 1) { + dungeon[i][j + 1] = 8; + } } } } diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index 59d3eafd7..75959092e 100644 --- a/Source/loadsave.cpp +++ b/Source/loadsave.cpp @@ -224,7 +224,10 @@ public: if (!IsValid(len)) return; - memcpy(&m_buffer_[m_cur_], bytes, len); + const auto *src = static_cast(bytes); + for (size_t i = 0; i < len; ++i) { + m_buffer_[m_cur_ + i] = src[i]; + } m_cur_ += len; } diff --git a/Source/lua/modules/log.cpp b/Source/lua/modules/log.cpp index 7a743c424..eea84a90e 100644 --- a/Source/lua/modules/log.cpp +++ b/Source/lua/modules/log.cpp @@ -56,7 +56,7 @@ void LuaLogMessage(LogPriority priority, std::string_view fmt, sol::variadic_arg // with an `FMT_EXCEPTIONS` check. std::string error = e.what(); #else - FMT_CATCH(const fmt::format_error) + FMT_CATCH(const fmt::format_error &) { std::string error = "unknown (FMT_EXCEPTIONS disabled)"; #endif diff --git a/Source/utils/log.hpp b/Source/utils/log.hpp index 1ada28c1d..028908e70 100644 --- a/Source/utils/log.hpp +++ b/Source/utils/log.hpp @@ -62,7 +62,7 @@ std::string format(std::string_view fmt, Args &&...args) // with an `FMT_EXCEPTIONS` check. std::string error = e.what(); #else - FMT_CATCH(const fmt::format_error) + FMT_CATCH(const fmt::format_error &) { std::string error = "unknown (FMT_EXCEPTIONS disabled)"; #endif