View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001990 | OpenMPT | File Format Support | public | 2026-10-11 19:52 | 2026-10-11 19:54 |
| Reporter | SkyLyrac | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | x86 / x64 | OS | Wine | OS Version | (version plz) |
| Product Version | OpenMPT 1.32.11.00 / libopenmpt 0.8.8 (current stable) | ||||
| Summary | 0001990: Pattern break in MOD/XM files is clamped without warning | ||||
| Description | I was testing corner-cases in MOD/XM files, and I created an XM file that had a pattern break to line 135 or so, and I noticed that my player was jumping to the wrong row. Basically, OpenMPT lets you write any value from 0x00 to 0xFF in a Dxx effect, but then it can only save values from 0x00 to 0x9F in the final file. While you are editing the file, it will use the original value without letting you know it goes over the limit, it will even jump to the correct row in the following pattern. When you save it, it doesn't warn you or anything because CSoundFile::ModSaveCommand() doesn't check bounds for CMD_PATTERNBREAK. It simply overflows, it doesn't max out at 0x9F. For MOD this isn't a big deal because you can't have MOD patterns with more than 64 rows, but XM can have longer patterns, and it could happen that someone uses a pattern break with a parameter over 0x9F. I would expect that the pattern editor doesn't let me input values higher than 0x9F, or that it warns me when it saves the file. | ||||
| Steps To Reproduce |
| ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Has the bug occurred in previous versions? | |||||
| Tested code revision (in case you know it) | |||||