diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b9c5ea..b6cdca8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ endif() set(VERSION_MAJOR 1) set(VERSION_MINOR 8) set(VERSION_PATCH 0) -set(VERSION_TWEAK 0) +set(VERSION_TWEAK 2) set(VERSION_RC "${CMAKE_CURRENT_BINARY_DIR}/version.rc") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in" "${VERSION_RC}" @ONLY) diff --git a/TpfConvert/src/ModfileLoader_TpfReader.ixx b/TpfConvert/src/ModfileLoader_TpfReader.ixx index 5c14a76..59b9b35 100644 --- a/TpfConvert/src/ModfileLoader_TpfReader.ixx +++ b/TpfConvert/src/ModfileLoader_TpfReader.ixx @@ -46,7 +46,7 @@ private: [[nodiscard]] char XOR(const char b, const long position) const { - if (position > line_length - 4) { + if (position >= (line_length / 4) * 4) { return b ^ TPF_XOREven; } diff --git a/modules/ModfileLoader_TpfReader.ixx b/modules/ModfileLoader_TpfReader.ixx index 1c7e728..81410d3 100644 --- a/modules/ModfileLoader_TpfReader.ixx +++ b/modules/ModfileLoader_TpfReader.ixx @@ -46,7 +46,7 @@ private: [[nodiscard]] char XOR(const char b, const long position) const { - if (position > line_length - 4) { + if (position >= (line_length / 4) * 4) { return b ^ TPF_XOREven; }