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: https://git.librecmc.org/?a=commitdiff_plain;h=99f5d4e;p=oweals%2Fluci.git 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':