aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2008-09-14 22:28:53 +0000
committerWillem Jan Palenstijn2008-09-14 22:28:53 +0000
commitc8eeae8d4dffa5849a23cf963884027a7789504b (patch)
tree1f2a0de23851cb7e7d1d77114c8379aa27f4fb85 /graphics
parentfbfe30bf861af9b83325e0c7fecd4b0a68da5af9 (diff)
downloadscummvm-rg350-c8eeae8d4dffa5849a23cf963884027a7789504b.tar.gz
scummvm-rg350-c8eeae8d4dffa5849a23cf963884027a7789504b.tar.bz2
scummvm-rg350-c8eeae8d4dffa5849a23cf963884027a7789504b.zip
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
Diffstat (limited to 'graphics')
-rw-r--r--graphics/iff.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/graphics/iff.cpp b/graphics/iff.cpp
index 514fba9cc0..b3846c5d26 100644
--- a/graphics/iff.cpp
+++ b/graphics/iff.cpp
@@ -219,7 +219,7 @@ void PBMDecoder::readBODY(Common::IFFChunk& chunk) {
switch (_bitmapHeader.pack) {
case 0:
- while (!chunk.eos()) {
+ while (!chunk.hasReadAll()) {
((byte*)_surface->pixels)[si++] = chunk.readByte();
}
break;
@@ -245,7 +245,9 @@ PackBitsReadStream::~PackBitsReadStream() {
}
bool PackBitsReadStream::eos() const {
- return _input->eos() & (_rStoragePos == _wStoragePos);
+ //FIXME: eos definition needs to be changed in parallaction engine
+ // which is the only place where this class is used
+ return _input->eos() && (_rStoragePos == _wStoragePos);
}
uint32 PackBitsReadStream::read(void *dataPtr, uint32 dataSize) {
@@ -291,6 +293,9 @@ void PackBitsReadStream::unpack() {
while (_out < _outEnd && !_input->eos()) {
byteRun = _input->readByte();
+ //FIXME: eos definition needs to be changed in parallaction engine
+ // which is the only place where this class is used
+ //if (_input->eos()) break;
if (byteRun <= 127) {
i = byteRun + 1;
for (j = 0; j < i; j++) {