Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormischarf2008-12-14 03:42:39 +0000
committermischarf2008-12-14 03:42:39 +0000
commit48fd445e1d217ef9e0b39dbd93ac98c65bc60d9b (patch)
treee4bc60dd42f8103a04ed03131e2d6775a1626304 /plugins
parentb58489abb19e8186cdcf8bfe592751afaf6a474a (diff)
downloadorg.eclipse.tcf-48fd445e1d217ef9e0b39dbd93ac98c65bc60d9b.tar.gz
org.eclipse.tcf-48fd445e1d217ef9e0b39dbd93ac98c65bc60d9b.tar.xz
org.eclipse.tcf-48fd445e1d217ef9e0b39dbd93ac98c65bc60d9b.zip
fixed parsing of floating point numbers
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/JSON.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/JSON.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/JSON.java
index e73be7976..88c1da7a2 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/JSON.java
+++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/protocol/JSON.java
@@ -208,7 +208,9 @@ public final class JSON {
read();
}
}
- return new BigDecimal(val, scale - fraction);
+ // the scale is <tt>(unscaledVal &times; 10<sup>-scale</sup>)</tt>.
+ // the negative power!?!
+ return new BigDecimal(val, fraction - scale);
}
private static Object readNestedObject() throws IOException {

Back to the top