From d425d889c9bdcba60642fdee8e36b00f22af2c61 Mon Sep 17 00:00:00 2001 From: Kamuri Amorim Date: Thu, 27 Apr 2023 16:35:14 -0300 Subject: [PATCH] hotfix: workaround for unknown opcodes stopping decompilation this is far from the ideal solution, as the code comes incomplete, but is better than not decompiling the file at all this workaround was proposed by https://github.com/zrax/pycdc/issues/307\#issuecomment-1382103504 --- ASTree.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ASTree.cpp b/ASTree.cpp index 5d8b8a6e1..38d93a73f 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -2563,9 +2563,10 @@ PycRef BuildFromCode(PycRef code, PycModule* mod) stack.push(nullptr); break; default: - fprintf(stderr, "Unsupported opcode: %s\n", Pyc::OpcodeName(opcode & 0xFF)); - cleanBuild = false; - return new ASTNodeList(defblock->nodes()); + stack.pop(); + // fprintf(stderr, "Unsupported opcode: %s\n", Pyc::OpcodeName(opcode & 0xFF)); + // cleanBuild = false; + // return new ASTNodeList(defblock->nodes()); } else_pop = ( (curblock->blktype() == ASTBlock::BLK_ELSE)