[ scummvm-Bugs-1592006 ] Typo in sysex_scumm.cpp ?

SourceForge.net noreply at sourceforge.net
Tue Nov 7 14:50:37 CET 2006


Bugs item #1592006, was opened at 2006-11-07 14:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1592006&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: iMuse/Music
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alban Bedel (albeu)
Assigned to: Nobody/Anonymous (nobody)
Summary: Typo in sysex_scumm.cpp ?

Initial Comment:
Hi,

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[0] & 0x0F);
    a = (p[1] & 0x0F) << 12 |(p[2] & 0x0F) << 8 |(p[4]
& 0x0F) << 4 |(p[4] & 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[1] & 0x0F) << 12 |(p[2] & 0x0F) << 8 |(p[3]
& 0x0F) << 4 |(p[4] & 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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1592006&group_id=37116




More information about the Scummvm-tracker mailing list