node-steam / vdf

Module to convert Valve's KeyValue format to JSON and back
https://node-steam.github.io/vdf/
MIT License
34 stars 3 forks source link

Infinite loop #16

Closed cracksoff closed 2 years ago

cracksoff commented 2 years ago

const data = fs.readFileSync(path, 'utf16le') const parsed = VDF.parse(data) Hi, got an error with actual(09.10.2022) csgo_english.txt file, code doesn't finish and works forever without any messages about errors etc

lenovouser commented 2 years ago

@cracksoff can you upload the .txt here for me?

cracksoff commented 2 years ago

@lenovouser must say sorry, im donkey copy pasted file's text wrong and that's why got error, sry for wasting your time :D

lenovouser commented 2 years ago

You can still upload it here if you want, the library should in theory exit on invalid files and not be stuck in an infinite loop. So I'd want to fix it anyways if that's fine with you 😄

cracksoff commented 2 years ago

@lenovouser sadly i've edited file already, but last line was like "You are not a member of this Steam Group. Visit their page to j it was cut somewhere in the middle of the file and in the middle of the line

lenovouser commented 2 years ago

@cracksoff I sadly can't re-produce it with that, but in case you ever run into this again please feel free to comment on here again, or open a new issue.