From e2016f6b18d8b39c4ba05a4f81a76bba696ff767 Mon Sep 17 00:00:00 2001 From: de4dot Date: Fri, 14 Dec 2012 12:29:52 +0100 Subject: [PATCH] Add clearStack() and pop(int) --- blocks/cflow/InstructionEmulator.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/blocks/cflow/InstructionEmulator.cs b/blocks/cflow/InstructionEmulator.cs index b0be6768..b49200ea 100644 --- a/blocks/cflow/InstructionEmulator.cs +++ b/blocks/cflow/InstructionEmulator.cs @@ -232,6 +232,17 @@ namespace de4dot.blocks.cflow { valueStack.push(value); } + public void clearStack() { + valueStack.clear(); + } + + public void pop(int num) { + if (num < 0) + valueStack.clear(); + else + valueStack.pop(num); + } + public Value pop() { return valueStack.pop(); }