mirror of
				https://github.com/hedge-dev/XenonRecomp.git
				synced 2025-11-04 06:47:09 +00:00 
			
		
		
		
	Handle invalid instructions as end block
This commit is contained in:
		@@ -120,7 +120,7 @@ Function Function::Analyze(const void* code, size_t size, size_t base)
 | 
			
		||||
 | 
			
		||||
            RESTORE_DATA();
 | 
			
		||||
        }
 | 
			
		||||
        else if (op == PPC_OP_B || instruction == 0 || insn.opcode->id == PPC_INST_BLR) // b, blr, end padding
 | 
			
		||||
        else if (op == PPC_OP_B || instruction == 0 || (insn.opcode != nullptr && insn.opcode->id == PPC_INST_BLR)) // b, blr, end padding
 | 
			
		||||
        {
 | 
			
		||||
            if (!isLink)
 | 
			
		||||
            {
 | 
			
		||||
@@ -173,6 +173,11 @@ Function Function::Analyze(const void* code, size_t size, size_t base)
 | 
			
		||||
                RESTORE_DATA();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (insn.opcode == nullptr)
 | 
			
		||||
        {
 | 
			
		||||
            blockStack.pop_back();
 | 
			
		||||
            RESTORE_DATA();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Sort and invalidate discontinuous blocks
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user