use charAt in CPDecimal, IE doesn't support []

This commit is contained in:
Klaas Pieter Annema committed 2010-11-30 16:05:32 +01:00
1 parent 32decc31db
commit a51672cc82
1 file changed
+2 -2
+2 -2
View File
@@ -152,14 +152,14 @@ function CPDecimalMakeWithString(string, locale)
{
if (i >= CPDecimalMaxDigits)
break; // truncate
[m addObject:parseInt(intpart[i])];
[m addObject:parseInt(intpart.charAt(i))];
}
var j = 0;
for (; j < (decpart?decpart.length:0); j++)
{
if ((i + j) >= CPDecimalMaxDigits)
break; // truncate
[m addObject:parseInt(decpart[j])];
[m addObject:parseInt(decpart.charAt(j))];
}
var dcm = {_exponent:exponent, _isNegative:isNegative, _isCompact:NO, _isNaN:NO, _mantissa:m};