]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagpcx.cpp
Doesn't reset the stream pos to 0 in CanRead().
[wxWidgets.git] / src / common / imagpcx.cpp
index 73bee7edf3024347dee7d782f195259b2d81329c..4f5ecbb32840eb3ce3cde0942301c662755f8aa8 100644 (file)
@@ -266,12 +266,9 @@ bool wxPCXHandler::SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(
 bool wxPCXHandler::DoCanRead( wxInputStream& stream )
 {
     unsigned char c;
-    off_t pos;
 
-    pos = stream.TellI();
-    stream.SeekI(0, wxFromStart);
     c = stream.GetC();
-    stream.SeekI(pos, wxFromStart);
+    stream.SeekI(-1, wxFromCurrent);
 
     // not very safe, but this is all we can get from PCX header :-(
     return (c == 10);