summaryrefslogtreecommitdiff
path: root/java/text/DecimalFormat.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/text/DecimalFormat.java')
-rw-r--r--java/text/DecimalFormat.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/java/text/DecimalFormat.java b/java/text/DecimalFormat.java
index b82d9e01b..529e57133 100644
--- a/java/text/DecimalFormat.java
+++ b/java/text/DecimalFormat.java
@@ -660,11 +660,11 @@ public class DecimalFormat extends NumberFormat
int len = str.length();
if (len < stop) stop = len;
- char ch;
- int i = 0;
- for (i = start; i < stop; i++)
+ int i = start;
+ while (i < stop)
{
- ch = str.charAt(i);
+ char ch = str.charAt(i);
+ i++;
if (ch >= zero && ch <= (zero + 9))
{
@@ -749,7 +749,7 @@ public class DecimalFormat extends NumberFormat
if (isNegative) number.insert(0, '-');
- pos.setIndex(i);
+ pos.setIndex(i - 1);
// now we handle the return type
BigDecimal bigDecimal = new BigDecimal(number.toString());