[Scummvm-devel] eof & err

Willem Jan Palenstijn wjp at usecode.org
Sun Jul 12 18:45:44 CEST 2009


On Sun, Jul 12, 2009 at 06:42:50PM +0200, sunmax at libero.it wrote:
> Hi Johannes,
> 
> thanks for your feedback.
> 
> [ In TIMInterpreter::load ]
> 
>     if (stream->err())
>         error("Read error while parsing file '%s", filename);
> 
> Yes. That's the spot.
> 
> Here is the diagnosis:
> 
>  - on PS2 _eof (returned by ->err()) is set when you seek or
>    read past the end of a file, but even when you just read
>    all the file
> 
>     if (_filePos >= _fileSize) {
>         _eof = true;
>     ...

That code is _before_ reading, though, so that should be ok.

-Willem Jan




More information about the Scummvm-devel mailing list