From 99f5d4e902d6905b0c02819495922043b1f07637 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 17 Feb 2016 16:33:34 +0100 Subject: luci-base: cbi.js: properly round down numbers for %u and %d patterns Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/cbi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') 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': -- cgit v1.2.3