mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-12-12 01:31:20 +04:00
Improved PUSH handlers by moving reg field check to CanHandle and adding proper boundary checking
This commit is contained in:
@@ -37,6 +37,11 @@ public class PushImm8Handler : InstructionHandler
|
||||
// Set the mnemonic
|
||||
instruction.Mnemonic = "push";
|
||||
|
||||
if(!Decoder.CanReadByte())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Read the immediate value
|
||||
byte imm8 = Decoder.ReadByte();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user