]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagiff.cpp
Applied patch [ 686843 ] File Dialog Wildcard Bug
[wxWidgets.git] / src / common / imagiff.cpp
index 25d700bc377dadfc3e7968959fb1741a9815975a..e852c4f645c3f1788995a6c3d9cd428fab297f4b 100644 (file)
@@ -235,7 +235,7 @@ bool wxIFFDecoder::CanRead()
     if ( !m_f->Read(buf, WXSIZEOF(buf)) )
         return FALSE;
 
-    m_f->SeekI(-WXSIZEOF(buf), wxFromCurrent);
+    m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
 
     return (memcmp(buf, "FORM", 4) == 0) && (memcmp(buf+8, "ILBM", 4) == 0);
 }
@@ -785,14 +785,9 @@ bool wxIFFHandler::SaveFile(wxImage * WXUNUSED(image),
 
 bool wxIFFHandler::DoCanRead(wxInputStream& stream)
 {
-    wxIFFDecoder *decod;
-    bool ok;
-
-    decod = new wxIFFDecoder(&stream);
-    ok = decod->CanRead();
-    delete decod;
+    wxIFFDecoder decod(&stream);
 
-    return ok;
+    return decod.CanRead();
 }
 
 #endif // wxUSE_STREAMS