From 24a96b95d322181b65b9c7417239e760929269da Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Mon, 11 Sep 2023 01:48:52 -0700 Subject: [PATCH] fix getarraymatchingstructs syntax --- Decompiler/PscCoder.cpp | 3 --- Decompiler/PscDecompiler.cpp | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Decompiler/PscCoder.cpp b/Decompiler/PscCoder.cpp index 7900dbd..032ce65 100644 --- a/Decompiler/PscCoder.cpp +++ b/Decompiler/PscCoder.cpp @@ -589,9 +589,6 @@ void Decompiler::PscCoder::writeFunction(int i, const Pex::Function &function, c write(stream.str()); writeDocString(i, function); } else { - if (functionName == "TaskmasterPossibleRestore"){ - int i = 0; // TODO: REMOVE THIS HACK - } auto decomp = PscDecompiler(function, object, m_CommentAsm, m_TraceDecompilation, m_DumpTree, m_OutputDir); if (decomp.isDebugFunction()) { diff --git a/Decompiler/PscDecompiler.cpp b/Decompiler/PscDecompiler.cpp index 607e011..6e4c868 100644 --- a/Decompiler/PscDecompiler.cpp +++ b/Decompiler/PscDecompiler.cpp @@ -114,7 +114,7 @@ Decompiler::PscDecompiler::PscDecompiler( const Pex::Function &function, m_TempTable.push_back("removelast"); m_TempTable.push_back("remove"); m_TempTable.push_back("clear"); - m_TempTable.push_back("getallmatchingstructs"); + m_TempTable.push_back("ArrayGetMatchingStructs"); m_TempTable.push_back("Lock"); m_TempTable.push_back("Unlock"); m_TempTable.push_back("TryLock"); @@ -690,7 +690,7 @@ void Decompiler::PscDecompiler::createNodesForBlocks(size_t block) } case Pex::OpCode::ARRAY_GETALLMATCHINGSTRUCTS: { - auto callNode = std::make_shared(ip, args[1].getId(), fromValue(ip, args[0]), m_TempTable.findIdentifier("getallmatchingstructs")); + auto callNode = std::make_shared(ip, args[1].getId(), fromValue(ip, args[0]), m_TempTable.findIdentifier("ArrayGetMatchingStructs")); auto argNode = callNode->getParameters(); *argNode << fromValue(ip, args[2]); *argNode << fromValue(ip, args[3]);