mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 16:18:37 +03: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