// Parts of this source are based on the iff loading algorithm found
// in xviff.c. Permission by the original author, Thomas Meyer, and
// by the author of xv, John Bradley for using the iff loading part
// Parts of this source are based on the iff loading algorithm found
// in xviff.c. Permission by the original author, Thomas Meyer, and
// by the author of xv, John Bradley for using the iff loading part
- m_f->Read(buf, 12);
- m_f->SeekI(-12, wxFromCurrent);
+ if ( !m_f->Read(buf, WXSIZEOF(buf)) )
+ return FALSE;
+
+ m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
- return (memcmp(buf, "FORM", 4) == 0 && memcmp(buf+8, "ILBM", 4) == 0);
+ return (memcmp(buf, "FORM", 4) == 0) && (memcmp(buf+8, "ILBM", 4) == 0);