[vtk-developers] ImageReader? (Dashboard troubles)
Brad King
brad.king at kitware.com
Fri Jun 14 12:34:20 EDT 2002
> Consider yourself winner of this weeks "Clever Toad" award. I've added
> a check for Borland CBuilder 6 and it does indeed solve the problem.
> -1 changes to 336535 or something of that sort and file read complets
> as normal. I'll submit a bug report to the borland bug tracking system
> too.
I don't think it is a compiler or library bug. When the end of file is
reached the "eof" bit is set. However, since the buffer was not filled to
the requested size, the "fail" bit is also set. Both of these should be
cleared before using "tellg()".
Try using these lines to clear the bits before calling tellg(). This
should be a replacement for Bill's fix.
self->GetFile()->clear(self->GetFile()->rdstate() &
~ios::eofbit);
self->GetFile()->clear(self->GetFile()->rdstate() &
~ios::failbit);
-Brad
More information about the vtk-developers
mailing list