avoid throwing EmptyStackExceptions in as2 deobfuscation

This commit is contained in:
honfika@gmail.com
2015-08-26 20:50:22 +02:00
parent 5465043ec0
commit 696ee04cb4
104 changed files with 1451 additions and 469 deletions

View File

@@ -69,6 +69,16 @@ public class TranslateStack extends Stack<GraphTargetItem> {
return super.peek();
}
public synchronized GraphTargetItem peek(int index) {
if (path != null) {
if (index > this.size()) {
Logger.getLogger(TranslateStack.class.getName()).log(Level.FINE, "{0}: Attemp to Peek item from stack", path);
return getPop();
}
}
return super.get(size() - index);
}
@Override
public synchronized GraphTargetItem pop() {
if (path != null) {