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:
@@ -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))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user