From 834a0c193ddae989ed5d4d103beb39d31aba2ab9 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Fri, 9 Jan 2026 13:53:08 +0100 Subject: [PATCH] might have 0X instead of 0x --- TpfConvert/src/ModfileLoader.ixx | 2 +- modules/ModfileLoader.ixx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TpfConvert/src/ModfileLoader.ixx b/TpfConvert/src/ModfileLoader.ixx index 908db9b..53525b9 100644 --- a/TpfConvert/src/ModfileLoader.ixx +++ b/TpfConvert/src/ModfileLoader.ixx @@ -14,7 +14,7 @@ export struct TexEntry { namespace { HashType GetCrcFromFilename(const std::string& filename) { - const static std::regex re(R"(0x[0-9a-fA-F]{4,16})", std::regex::optimize); + const static std::regex re(R"(0[xX][0-9a-fA-F]{4,16})", std::regex::optimize); std::smatch match; if (!std::regex_search(filename, match, re)) { return 0; diff --git a/modules/ModfileLoader.ixx b/modules/ModfileLoader.ixx index 9659daf..02dbbd1 100644 --- a/modules/ModfileLoader.ixx +++ b/modules/ModfileLoader.ixx @@ -14,7 +14,7 @@ namespace { bool use_64_bit_crc = false; HashType GetCrcFromFilename(const std::string& filename) { - const static std::regex re(R"(0x[0-9a-fA-F]{4,16})", std::regex::optimize); + const static std::regex re(R"(0[xX][0-9a-fA-F]{4,16})", std::regex::optimize); std::smatch match; if (!std::regex_search(filename, match, re)) { return 0; @@ -124,9 +124,12 @@ void ParseSimpleArchive(const libzippp::ZipArchive& archive, std::vector(entry.readAsBinary()); const auto size = entry.getSize(); std::vector vec(data_ptr, data_ptr + size);