bool wxPCXHandler::DoCanRead( wxInputStream& stream )
{
- unsigned char c;
-
- c = stream.GetC();
- stream.SeekI(-1, wxFromCurrent);
+ unsigned char c = stream.GetC();
+ if ( !stream )
+ return FALSE;
// not very safe, but this is all we can get from PCX header :-(
- return (c == 10);
+ return c == 10;
}
#endif // wxUSE_STREAMS && wxUSE_PCX