summaryrefslogtreecommitdiffhomepage
path: root/libs/web/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-03-13 21:56:31 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-03-13 21:56:31 +0000
commit8cab9e2b8fcb6116d49b116bbb747069551d094c (patch)
tree23a2ae0ef11bcbeb10334e40153ff63b5fa73634 /libs/web/htdocs/luci-static
parent831654f504c7a9ef8efc9286e1f09cf942ce05c8 (diff)
libs/web: explicitely cast input value of %m pattern to float in order to avoid throwing an exception in toFixed() with very low values
Diffstat (limited to 'libs/web/htdocs/luci-static')
-rw-r--r--libs/web/htdocs/luci-static/resources/cbi.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js
index 41e7512062..ddafd79180 100644
--- a/libs/web/htdocs/luci-static/resources/cbi.js
+++ b/libs/web/htdocs/luci-static/resources/cbi.js
@@ -1032,7 +1032,7 @@ if( ! String.format )
var pr = pPrecision ? Math.floor(10*parseFloat('0'+pPrecision)) : 2;
var i = 0;
- var val = (param || 0);
+ var val = parseFloat(param || 0);
var units = [ '', 'K', 'M', 'G', 'T', 'P', 'E' ];
for (i = 0; (i < units.length) && (val > mf); i++)