diff options
author | 0neGal <mail@0negal.com> | 2024-06-14 23:50:43 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-06-14 23:50:43 +0200 |
commit | 384977de2f89cdd26e15adc1f274bf46b3c7a03e (patch) | |
tree | 25803f6d20dd8c4c213955ea05c56f6a5d9ad5b6 /src/modules/findgame.js | |
parent | 04b0e9fcea6c60257d7bc68994103eacb340a82b (diff) | |
download | Viper-384977de2f89cdd26e15adc1f274bf46b3c7a03e.tar.gz Viper-384977de2f89cdd26e15adc1f274bf46b3c7a03e.zip |
verify VDF files gets parsed correctly
Diffstat (limited to 'src/modules/findgame.js')
-rw-r--r-- | src/modules/findgame.js | 5 |
1 files changed, 5 insertions, 0 deletions
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"]); |