Correct toString for number variable values while debugging

This commit is contained in:
Jindra Petřík
2016-01-16 20:36:48 +01:00
parent ecec7ebdeb
commit 9b98d11f58
@@ -45,6 +45,7 @@ import com.jpexs.decompiler.flash.action.parser.script.ActionScriptLexer;
import com.jpexs.decompiler.flash.action.parser.script.ParsedSymbol;
import com.jpexs.decompiler.flash.action.parser.script.SymbolType;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.ecma.EcmaScript;
import com.jpexs.decompiler.flash.gui.AppDialog;
import com.jpexs.decompiler.flash.gui.AppStrings;
import com.jpexs.decompiler.flash.gui.DebugPanel;
@@ -507,14 +508,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
case VariableType.STRING:
return "\"" + Helper.escapeActionScriptString("" + v.value) + "\"";
default:
if (v.value instanceof Number) {
String sv = "" + v.value;
if (sv.endsWith(".0")) {
sv = sv.substring(0, sv.length() - 2);
}
return sv;
}
return "" + v.value;
return EcmaScript.toString(v.value);
}
}