1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-17 03:03:32 +01:00

explicitly specify the radix when parsing the arg to formatBytes()

This commit is contained in:
Doug Kearns
2008-06-03 15:22:47 +00:00
parent ff132570d3
commit 3157772347
2 changed files with 2 additions and 2 deletions

View File

@@ -478,7 +478,7 @@ liberator.Options = function () //{{{
break; break;
case "number": case "number":
value = parseInt(value); value = parseInt(value); // deduce radix
if (isNaN(value)) if (isNaN(value))
{ {

View File

@@ -104,7 +104,7 @@ liberator.util = { //{{{
{ {
const unitVal = ["Bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]; const unitVal = ["Bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
var unitIndex = 0; var unitIndex = 0;
var tmpNum = parseInt(num) || 0; var tmpNum = parseInt(num, 10) || 0;
var strNum = [tmpNum + ""]; var strNum = [tmpNum + ""];
if (humanReadable) if (humanReadable)