From 97810bb4721eb9446e472e7c85b3108e05baab92 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 27 Mar 2012 09:36:11 +0000 Subject: [PATCH] fix a regression in formatValue, concerning the number of decimals --- source/Ox/js/Format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ox/js/Format.js b/source/Ox/js/Format.js index b16f9f22..38de412f 100644 --- a/source/Ox/js/Format.js +++ b/source/Ox/js/Format.js @@ -546,7 +546,7 @@ Ox.formatValue = function(num, str, bin) { val; Ox.forEach(Ox.PREFIXES, function(chr, i) { if (num < Math.pow(base, i + 1) || i == len - 1) { - val = Ox.formatNumber(num / Math.pow(base, i), i) + + val = Ox.formatNumber(num / Math.pow(base, i), i ? i - 1 : 0) + ' ' + chr + (chr && bin ? 'i' : '') + str; return false; }