mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-08 18:46:12 +00:00
avoid throwing EmptyStackExceptions in as2 deobfuscation
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.graph;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
import com.jpexs.decompiler.flash.action.model.DirectValueActionItem;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter;
|
||||
@@ -375,4 +376,15 @@ public abstract class GraphTargetItem implements Serializable, Cloneable {
|
||||
writer.endBlock();
|
||||
return writer;
|
||||
}
|
||||
|
||||
public long getAsLong() {
|
||||
if (this instanceof DirectValueActionItem) {
|
||||
DirectValueActionItem dvai = (DirectValueActionItem) this;
|
||||
if (dvai.value instanceof Long) {
|
||||
return (long) (Long) dvai.value;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user