From: Jo-Philipp Wich Date: Wed, 17 Feb 2016 15:33:34 +0000 (+0100) Subject: luci-base: cbi.js: properly round down numbers for %u and %d patterns X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=99f5d4e902d6905b0c02819495922043b1f07637 luci-base: cbi.js: properly round down numbers for %u and %d patterns Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index c084709f9..26fd92471 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -1360,11 +1360,11 @@ String.prototype.format = function() break; case 'd': - subst = (+param || 0); + subst = ~~(+param || 0); break; case 'u': - subst = Math.abs(+param || 0); + subst = ~~Math.abs(+param || 0); break; case 'f':