X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/910413e7531bf6793866d52e72b58f4576833cd3..85ee88cd536cbf8b347e58f84b160b60204ed157:/src/common/gifdecod.cpp diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index 76450239a3..27669b8d2a 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -575,16 +575,13 @@ as an End of Information itself) // CanRead: // Returns true if the file looks like a valid GIF, false otherwise. // -bool wxGIFDecoder::CanRead(wxInputStream &stream) const +bool wxGIFDecoder::DoCanRead(wxInputStream &stream) const { unsigned char buf[3]; if ( !stream.Read(buf, WXSIZEOF(buf)) ) return false; - if (stream.SeekI(-(wxFileOffset)WXSIZEOF(buf), wxFromCurrent) == wxInvalidOffset) - return false; // this happens e.g. for non-seekable streams - return memcmp(buf, "GIF", WXSIZEOF(buf)) == 0; }