From 09869e8efd781b23450bee740c8b8d2fd4e62782 Mon Sep 17 00:00:00 2001 From: kazip Date: Thu, 6 Jun 2024 14:51:31 +0300 Subject: [PATCH] improved memory parsing --- stats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stats.js b/stats.js index 46fa1ae..9b30d68 100644 --- a/stats.js +++ b/stats.js @@ -11,7 +11,7 @@ var db = new sqlite3.Database(DB_FILE); var getBytes = function(s) { var bytes = 0; - var value = s.match(/\d+/g)[0]; + var value = s.match(/[0-9.]+/g)[0]; var unit = s.match(/[a-zA-Z]+/g)[0].toUpperCase(); if (unit == 'KB' || unit == 'KIB') { return value*1024;