sezero / mikmod

Mikmod Sound System (mirror of git repo at https://sf.net/projects/mikmod/)
http://mikmod.sourceforge.net/
72 stars 22 forks source link

Fix handling of .FAR pattern break byte. #10

Closed AliceLR closed 3 years ago

AliceLR commented 3 years ago

Despite the confusing documentation for the .FAR format, the first byte of each pattern in a .FAR file is not the pattern length in bytes but instead represents the index of the final row of the pattern, minus 1. Farandole Composer uses the value of this byte plus 2 to determine the final length of the pattern. This patch changes the .FAR loader to add 2 to this byte when deriving the row count.

This fixes #5.