diff --git a/src/t6/xsk/decompiler.cpp b/src/t6/xsk/decompiler.cpp index e7631215..b4dee138 100644 --- a/src/t6/xsk/decompiler.cpp +++ b/src/t6/xsk/decompiler.cpp @@ -2035,7 +2035,7 @@ auto decompiler::lvalues_match(const ast::stmt_assign::ptr& stmt1, const ast::st return false; } -auto decompiler::resolve_label(const std::string& name) -> std::int32_t +auto decompiler::resolve_label(const std::string& name) -> std::uint32_t { for (const auto& entry : labels_) { diff --git a/src/t6/xsk/decompiler.hpp b/src/t6/xsk/decompiler.hpp index d9328572..ed68aa2e 100644 --- a/src/t6/xsk/decompiler.hpp +++ b/src/t6/xsk/decompiler.hpp @@ -51,7 +51,7 @@ private: auto find_location_index(const ast::stmt_list::ptr& stmt, const std::string& location) -> std::uint32_t; auto last_location_index(const ast::stmt_list::ptr& stmt, std::uint32_t index) -> bool; auto lvalues_match(const ast::stmt_assign::ptr& stmt1, const ast::stmt_assign::ptr& stmt2) -> bool; - auto resolve_label(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::uint32_t; void process_thread(const ast::decl_thread::ptr& thread); void process_stmt(const ast::stmt& stmt); void process_stmt_list(const ast::stmt_list::ptr& stmt); diff --git a/src/tool/xsk/main.cpp b/src/tool/xsk/main.cpp index 6395250b..b1716d81 100644 --- a/src/tool/xsk/main.cpp +++ b/src/tool/xsk/main.cpp @@ -568,13 +568,19 @@ void execute(mode mode, game game, const std::string& path) { if (entry.is_regular_file()) { - if (game < game::T6) gsc::funcs[mode](game, entry.path().string()); else arc::funcs[mode](game, entry.path()); + if (game < game::T6) + gsc::funcs[mode](game, entry.path().string()); + else + arc::funcs[mode](game, std::filesystem::path(entry.path(), std::filesystem::path::format::generic_format)); } } } else if (std::filesystem::is_regular_file(path)) { - if (game < game::T6) gsc::funcs[mode](game, path); else arc::funcs[mode](game, path); + if (game < game::T6) + gsc::funcs[mode](game, path); + else + arc::funcs[mode](game, std::filesystem::path(path, std::filesystem::path::format::generic_format)); } }