X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b8ec767b9ee788c6ec2af3fa9023762d8429f86..424da8bdb9f05243d8888d78a56ab0cc3f615a6c:/src/common/gifdecod.cpp diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index 3701ea569a..27669b8d2a 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -19,6 +19,8 @@ #ifndef WX_PRECOMP #include "wx/palette.h" + #include "wx/intl.h" + #include "wx/log.h" #endif #include @@ -573,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; }