]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagtiff.cpp
Applied patch [ 602924 ] colours and effects in wxMSW::wxFontDialog
[wxWidgets.git] / src / common / imagtiff.cpp
index 0c741c92c1725465379fbfc19bdeb9d7da841607..16c952d297020d7d399ab2730a928017e081e345 100644 (file)
@@ -370,11 +370,11 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream )
 {
     unsigned char hdr[2];
 
 {
     unsigned char hdr[2];
 
-    stream.Read(&hdr, 2);
-    stream.SeekI(-2, wxFromCurrent);
+    if ( !stream.Read(&hdr, WXSIZEOF(hdr)) )
+        return FALSE;
 
 
-    return ((hdr[0] == 0x49 && hdr[1] == 0x49) ||
-            (hdr[0] == 0x4D && hdr[1] == 0x4D));
+    return (hdr[0] == 'I' && hdr[1] == 'I') ||
+           (hdr[0] == 'M' && hdr[1] == 'M');
 }
 
 
 }