From 24d56461ff4b746e0ac1369251e11a198a16435e Mon Sep 17 00:00:00 2001 From: a2x <45197573+a2x@users.noreply.github.com> Date: Fri, 8 Sep 2023 23:34:22 +1000 Subject: [PATCH] Fixed invalid key name --- src/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 41fdd9ff..1c99a546 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,12 +20,6 @@ static const std::array void generate_file(const std::string_view file_name, const Entries& entries, IFileBuilder& builder) { const std::string output_file_path = std::format("generated/{}.{}", file_name, builder.get_extension()); @@ -40,6 +34,12 @@ void generate_file(const std::string_view file_name, const Entries& entries, IFi builder.write_top_level(output); + const auto sanitize_namespace = [](const std::string& namespace_name) -> std::string { + static std::regex namespace_regex("\\::"); + + return std::regex_replace(namespace_name, namespace_regex, "_"); + }; + for (auto it = entries.begin(); it != entries.end(); ++it) { const auto& [namespace_name, variables] = *it; @@ -138,7 +138,7 @@ void fetch_offsets() noexcept { spdlog::info("view matrix: {:#x}", view_matrix_rva); const Entries entries = { - { "client.dll", { + { "client_dll", { { "entity_list", entity_list_rva }, { "local_player_controller", local_player_controller_rva }, { "view_matrix", view_matrix_rva }