mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-25 21:47:07 +00:00
avoid throwing EmptyStackExceptions in as2 deobfuscation
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user