Changed AS1/2/3 P-code - format Number values with EcmaScript toString function

This commit is contained in:
Jindra Petřík
2023-03-19 22:43:41 +01:00
parent f81d1ac58d
commit 8116df7a7b
4 changed files with 14 additions and 7 deletions
@@ -32,6 +32,7 @@ import com.jpexs.decompiler.flash.action.parser.pcode.ASMParsedSymbol;
import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.ecma.EcmaScript;
import com.jpexs.decompiler.flash.ecma.Null;
import com.jpexs.decompiler.flash.ecma.Undefined;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
@@ -346,6 +347,8 @@ public class ActionPush extends Action {
ret = "\"" + Helper.escapeActionScriptString((String) value) + "\"";
} else if (value instanceof RegisterNumber) {
ret = ((RegisterNumber) value).toStringNoName();
} else if ((value instanceof Float)||(value instanceof Double)) {
ret = EcmaScript.toString(value);
} else {
ret = value.toString();
}