Summary: | wrong value with leading zero in toFixed() function | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Nikolay Pavlov <qpadla> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: |
Description
Nikolay Pavlov
2007-04-12 04:32:15 UTC
SVN commit 656293 by porten: Fixed off-by-one digit error in toFixed(). Already fixed in trunk. BUG: 144115 M +6 -0 ChangeLog M +1 -1 number_object.cpp --- branches/KDE/3.5/kdelibs/kjs/ChangeLog #656292:656293 @@ -1,3 +1,9 @@ +2007-04-20 Harri Porten <porten@kde.org> + + * number_object.cpp: fixed leading-zero loss on toFixed() call by + following the spec algorithm properly. Nikolay Pavlov's bug + report: http://bugs.kde.org/144115. + 2007-03-13 Harri Porten <porten@kde.org> * function.cpp (decodeURI): don't drop last character of unescaped --- branches/KDE/3.5/kdelibs/kjs/number_object.cpp #656292:656293 @@ -241,7 +241,7 @@ UString m = integer_part_noexp(n); int k = m.size(); - if (m.size() < f) { + if (k <= f) { UString z = ""; for (int i = 0; i < f+1-k; i++) z += "0"; |