mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 15:14:49 +00:00
AS1/2 ActionTry fix
AS1/2 Infinity
This commit is contained in:
@@ -61,30 +61,28 @@ public class DirectValueTreeItem extends TreeItem {
|
||||
if (value instanceof Boolean) {
|
||||
return ((Boolean) value) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
if (value instanceof String) {
|
||||
String s=(String) value;
|
||||
if(s.length()==1){
|
||||
String s = (String) value;
|
||||
if (s.length() == 1) {
|
||||
return s.charAt(0);
|
||||
}
|
||||
double ret=0.0;
|
||||
try{
|
||||
ret=Double.parseDouble(s);
|
||||
}catch(NumberFormatException nex){
|
||||
|
||||
double ret = 0.0;
|
||||
try {
|
||||
ret = Double.parseDouble(s);
|
||||
} catch (NumberFormatException nex) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
if (value instanceof ConstantIndex) {
|
||||
String s=(this.constants.get(((ConstantIndex) value).index));
|
||||
if(s.length()==1){
|
||||
String s = (this.constants.get(((ConstantIndex) value).index));
|
||||
if (s.length() == 1) {
|
||||
return s.charAt(0);
|
||||
}
|
||||
double ret=0.0;
|
||||
try{
|
||||
ret=Double.parseDouble(s);
|
||||
}catch(NumberFormatException nex){
|
||||
|
||||
double ret = 0.0;
|
||||
try {
|
||||
ret = Double.parseDouble(s);
|
||||
} catch (NumberFormatException nex) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -109,16 +107,16 @@ public class DirectValueTreeItem extends TreeItem {
|
||||
return ((Long) value) != 0;
|
||||
}
|
||||
if (value instanceof String) {
|
||||
String s=(String) value;
|
||||
if(s.length()==1){
|
||||
return toNumber()==0;
|
||||
String s = (String) value;
|
||||
if (s.length() == 1) {
|
||||
return toNumber() == 0;
|
||||
}
|
||||
return !s.equals("");
|
||||
}
|
||||
if (value instanceof ConstantIndex) {
|
||||
String s=(this.constants.get(((ConstantIndex) value).index));
|
||||
if(s.length()==1){
|
||||
return toNumber()==0;
|
||||
String s = (this.constants.get(((ConstantIndex) value).index));
|
||||
if (s.length() == 1) {
|
||||
return toNumber() == 0;
|
||||
}
|
||||
return !s.equals("");
|
||||
}
|
||||
@@ -189,9 +187,7 @@ public class DirectValueTreeItem extends TreeItem {
|
||||
|
||||
@Override
|
||||
public boolean isCompileTime() {
|
||||
return (value instanceof Double) || (value instanceof Float) || (value instanceof Boolean) || (value instanceof Long) || (value instanceof Null) || (computedRegValue != null && computedRegValue.isCompileTime())
|
||||
|
||||
//||(value instanceof String) || (value instanceof ConstantIndex)
|
||||
return (value instanceof Double) || (value instanceof Float) || (value instanceof Boolean) || (value instanceof Long) || (value instanceof Null) || (computedRegValue != null && computedRegValue.isCompileTime()) //||(value instanceof String) || (value instanceof ConstantIndex)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user