diff --git a/docs/index.html b/docs/index.html index eb0cf38..6b77f22 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,7 +9,7 @@
-Simple system and OS information library for node.js
diff --git a/lib/cpu.js b/lib/cpu.js index 6177fef..e01b98b 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -557,7 +557,7 @@ function cpuTemperature(callback) { let sum = 0; let lines = stdout.split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0); lines.forEach(function (line) { - let value = (parseInt(line) - 2732) / 10; + let value = (parseInt(line, 10) - 2732) / 10; sum = sum + value; if (value > result.max) result.max = value; result.cores.push(value); @@ -787,8 +787,8 @@ function cpuCache(callback) { result.l1i = 0; result.l2 = util.getValue(lines, 'l2cachesize', '='); result.l3 = util.getValue(lines, 'l3cachesize', '='); - if (result.l2) { result.l2 = parseInt(result.l2) * 1024; } - if (result.l3) { result.l3 = parseInt(result.l3) * 1024; } + if (result.l2) { result.l2 = parseInt(result.l2, 10) * 1024; } + if (result.l3) { result.l3 = parseInt(result.l3, 10) * 1024; } } exec(util.getWmic() + ' path Win32_CacheMemory get CacheType,InstalledSize,Purpose', function (error, stdout) { if (!error) {