From 384977de2f89cdd26e15adc1f274bf46b3c7a03e Mon Sep 17 00:00:00 2001 From: 0neGal Date: Fri, 14 Jun 2024 23:50:43 +0200 Subject: verify VDF files gets parsed correctly --- src/modules/findgame.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/findgame.js b/src/modules/findgame.js index 505595f..f8d0126 100644 --- a/src/modules/findgame.js +++ b/src/modules/findgame.js @@ -30,6 +30,11 @@ module.exports = async () => { function readvdf(data) { data = vdf.parse(data); // parse read_data + // verify VDF was parsed correctly + if (! data || typeof data !== "object") { + return; + } + // list of folders where the game could possibly be installed at let values = Object.values(data["libraryfolders"]); -- cgit v1.2.3