f2e-spec icon indicating copy to clipboard operation
f2e-spec copied to clipboard

INI parser is broken

Open Lord-Kamina opened this issue 3 years ago • 1 comments

Performous & operating system versions

Performous: master OS: Any

What is the problem?

The INI parser is broken. Why? Performous uses a very naive approach to checking if a file looks like an ini-formatted song, essentially looking for a particular section as the first few characters on a file. This is wrong, because the sections could be in a different order but still be a perfectly valid file.

Steps to reproduce

Grab an ini file, move the [song] section below the first line of the file, and the song will no longer be recognized.

Additional context

No response

Log(s) & preferences file(s)

No response

Lord-Kamina avatar Aug 11 '22 21:08 Lord-Kamina

Not the highest priority right now, but yeah this is a bug and not only for the ini-parser, it also applies to the xml parser, stepmania and txt parser. The first few characters are read and based on that it's determined if the file is alright. This is not a proper detection, but will work 90% of the time though

Baklap4 avatar Sep 12 '22 17:09 Baklap4