]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/xpmdecod.cpp
Forgot header with OSX prefix
[wxWidgets.git] / src / common / xpmdecod.cpp
index 8d38a3132ef1ebb4bcbfca7c9b24d892fadd3ae4..54e54c5221e5aeabe90011754f6e19d01793b815 100644 (file)
@@ -122,7 +122,8 @@ bool wxXPMDecoder::CanRead(wxInputStream& stream)
     if ( !stream.Read(buf, WXSIZEOF(buf)) )
         return false;
 
-    stream.SeekI(-(wxFileOffset)WXSIZEOF(buf), wxFromCurrent);
+    if (stream.SeekI(-(wxFileOffset)WXSIZEOF(buf), wxFromCurrent) == wxInvalidOffset)
+        return false;
 
     return memcmp(buf, "/* XPM */", WXSIZEOF(buf)) == 0;
 }