KungFuFurby / AddMusicKFF

Fork of AddMusicK, a compiler/inserter of music for Super Mario World
23 stars 15 forks source link

Infinite loop when "Addmusic_sample groups.txt" includes invalid data #395

Open spooonsss opened 1 year ago

spooonsss commented 1 year ago

I assumed Addmusic_sample groups.txt would support comments, but it puts the parser into an infinite loop instead.

Try Addmusic_sample groups.txt:


;f

https://github.com/KungFuFurby/AddMusicKFF/blob/312f3454b87808baac4001e762f634e89cac2280/src/AddmusicK/AddmusicK.cpp#L609 needs an else that throws an error.

(I'd suggest it support comments too)

KungFuFurby commented 1 year ago

Yup. I can see how this can occur: simply by not even finding a sample group name to begin with and not having gotten any samples either and running into any non-alphanumeric character. For whatever reason, I may have other suspicions on the ones that do output errors...