From 996780ba2842059909e6ba2be445c11c0e20ab04 Mon Sep 17 00:00:00 2001 From: xensik Date: Mon, 15 Nov 2021 22:18:55 +0100 Subject: [PATCH] weird clang seg fault on release --- src/tool/xsk/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tool/xsk/main.cpp b/src/tool/xsk/main.cpp index 864509dd..8fdb38d4 100644 --- a/src/tool/xsk/main.cpp +++ b/src/tool/xsk/main.cpp @@ -304,7 +304,6 @@ void decompile_file(game game, std::string file) try { const auto& disassembler = disassemblers[game]; - const auto& decompiler = decompilers[game]; if(zonetool) { @@ -335,7 +334,7 @@ void decompile_file(game game, std::string file) const auto ext = std::string(".gscbin"); const auto extpos = file.find(ext); - + if (extpos != std::string::npos) { file.replace(extpos, ext.length(), ""); @@ -352,6 +351,8 @@ void decompile_file(game game, std::string file) disassembler->disassemble(file, script.bytecode, stack); } + const auto& decompiler = decompilers[game]; + auto output = disassembler->output(); decompiler->decompile(file, output);