Ticket #8312: vorbis.diff

File vorbis.diff, 619 bytes (added by eriktorbjorn, 16 years ago)

Patch against a January 17 CVS snapshot

  • scummvm/sound/vorbis.cpp

    diff -ur --exclude=CVS ScummVM/scummvm/sound/vorbis.cpp ScummVM+hack/scummvm/sound/vorbis.cpp
    old new  
    229229int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) {
    230230        int samples = 0;
    231231        while (samples < numSamples && !eosIntern()) {
    232                 const int len = MIN(numSamples, samples + (int)(_bufferEnd - _pos));
     232                const int len = MIN(numSamples - samples, (int)(_bufferEnd - _pos));
    233233                memcpy(buffer, _pos, len * 2);
    234234                buffer += len;
    235235                _pos += len;