Better decimal support (For ABCs with minor version 17)

This commit is contained in:
Jindra Petřík
2024-08-12 19:51:40 +02:00
parent 9ee2549e60
commit 534ac03314
53 changed files with 4443 additions and 91 deletions
@@ -46,6 +46,8 @@ public class DottedChain implements Serializable, Comparable<DottedChain> {
public static final DottedChain ARRAY = new DottedChain(new String[]{"Array"});
public static final DottedChain NUMBER = new DottedChain(new String[]{"Number"});
public static final DottedChain DECIMAL = new DottedChain(new String[]{"decimal"});
public static final DottedChain OBJECT = new DottedChain(new String[]{"Object"});
@@ -18,7 +18,7 @@ package com.jpexs.decompiler.graph;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
import com.jpexs.decompiler.flash.abc.avm2.model.ConvertAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.FloatValueAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.DoubleValueAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.NameValuePair;
import com.jpexs.decompiler.flash.abc.avm2.model.NewArrayAVM2Item;
@@ -157,14 +157,14 @@ public abstract class GraphTargetItem implements Serializable, Cloneable {
return new StringAVM2Item(null, null, (String) r);
}
if (r instanceof Long) {
return new FloatValueAVM2Item(null, null, (double) (Long) r);
return new DoubleValueAVM2Item(null, null, (double) (Long) r);
}
if (r instanceof Integer) {
return new IntegerValueAVM2Item(null, null, (Integer) r);
}
if (r instanceof Double) {
return new FloatValueAVM2Item(null, null, (Double) r);
return new DoubleValueAVM2Item(null, null, (Double) r);
}
if (r instanceof Null) {
return new NullAVM2Item(null, null);