Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3M decoding fails with empty patterns #607

Open
AntonioND opened this issue May 15, 2022 · 0 comments
Open

S3M decoding fails with empty patterns #607

AntonioND opened this issue May 15, 2022 · 0 comments

Comments

@AntonioND
Copy link

AntonioND commented May 15, 2022

I don't know if this is part of the specifications, because S3M seems to be a very loosely-defined format.

When a pattern is completely empty, OpenMPT likes to have a pattern_ptr that is simply 0 (instead of pointing at an array of 64 empty rows). At the moment, the decoder thinks that the para pointer of value 0 is correct, and it starts reading bytes at the start of the file. I'm using Python, and I would expect an exception or something when trying to read data from that pattern.

I've attached a file that shows this issue:

empty_pattern.s3m.zip

For more context, I'm creating a Python script that converts S3M files into a custom format so that it can be played on the Game Boy Advance: https://github.com/AntonioND/gbt-player/blob/ef3ff9f5474e170b0b2fdf765c337e398197b972/gba/s3m2gbt/s3m2gbt.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant