projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libs/web: explicitely cast input value of %m pattern to float in order to avoid throw...
[project/luci.git]
/
libs
/
web
/
htdocs
/
luci-static
/
resources
/
cbi.js
diff --git
a/libs/web/htdocs/luci-static/resources/cbi.js
b/libs/web/htdocs/luci-static/resources/cbi.js
index
41e7512
..
ddafd79
100644
(file)
--- 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++)