Ticket #9177: 0001-fix-MSC-loading-on-big-endian.patch

File 0001-fix-MSC-loading-on-big-endian.patch, 857 bytes (added by fuzzie, 14 years ago)
  • engines/parallaction/sound_br.cpp

    From 96db6aa19b7a91cdfe6d1bd6e0b3095668216c1c Mon Sep 17 00:00:00 2001
    From: Alyssa Milburn <fuzzie@fuzzie.org>
    Date: Thu, 20 May 2010 00:50:47 +0200
    Subject: [PATCH] fix MSC loading on big-endian
    
    ---
     engines/parallaction/sound_br.cpp |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
    index 1c724dd..407dd86 100644
    a b bool MidiParser_MSC::loadMusic(byte *data, uint32 size) {  
    172172
    173173        byte *pos = data;
    174174
    175         uint32 signature = read4high(pos);
    176         if (memcmp("tCSM", &signature, 4)) {
     175        if (memcmp("MSCt", pos, 4)) {
    177176                warning("Expected header not found in music file.");
    178177                return false;
    179178        }
     179        pos += 4;
    180180
    181181        _beats = read1(pos);
    182182        _ppqn = read2low(pos);