IMUSE: Typo in sysex_scumm.cpp ?
|Reported by:||SF/albeu||Owned by:||sev-|
while digging the iMUSE code for ScummC i found some code that look very much like a typo. At the end of sysex_scumm.cpp (around line 190) there is:
case 96: // Set instrument part = player->getPart(p & 0x0F); a = (p & 0x0F) << 12 |(p & 0x0F) << 8 |(p & 0x0F) << 4 |(p & 0x0F);
Which should read a 16 bit value from the "one-nibble-per-byte" encoding used in the imuse sysex, but that should probably be:
a = (p & 0x0F) << 12 |(p & 0x0F) << 8 |(p & 0x0F) << 4 |(p & 0x0F);
If not then a comment would be a good idea because the code just doesn't look logical. I attached a patch with the fix above.
Ticket imported from: #1592006. Ticket imported from: bugs/2894.