From c8eeae8d4dffa5849a23cf963884027a7789504b Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 14 Sep 2008 22:28:53 +0000 Subject: Big patch changing semantics of ReadStream::eos(): eos() now only returns true _after_ trying to read past the end of the stream. This has a large potential for regressions. Please test! svn-id: r34549 --- engines/saga/animation.cpp | 2 +- engines/saga/sprite.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/saga') diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 9fffb0f8bf..e9e146013f 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -866,7 +866,7 @@ int Anim::fillFrameOffsets(AnimationData *anim, bool reallyFill) { readS._bigEndian = !_vm->isBigEndian(); // RLE has inversion BE<>LE - while (!readS.eos()) { + while (readS.pos() != readS.size()) { if (reallyFill) { anim->frameOffsets[currentFrame] = readS.pos(); diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index d9c7b446ba..ee2e2b922f 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -423,6 +423,7 @@ void Sprite::decodeRLEBuffer(const byte *inputBuffer, size_t inLength, size_t ou } for (c = 0; c < fg_runcount && !readS.eos(); c++) { + // FIXME: eos changed; error handling? *outPointer = readS.readByte(); if (outPointer < outPointerEnd) outPointer++; -- cgit v1.2.3