From 5c4506a8c5ee1a82268146007619b09e980a7a57 Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 2 May 2009 17:28:21 +0200 Subject: add some assert() to make tutor happy --- ue2/imgsynth2/cwindowsbitmap.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ue2/imgsynth2/cwindowsbitmap.cpp') diff --git a/ue2/imgsynth2/cwindowsbitmap.cpp b/ue2/imgsynth2/cwindowsbitmap.cpp index d561465..83954b6 100644 --- a/ue2/imgsynth2/cwindowsbitmap.cpp +++ b/ue2/imgsynth2/cwindowsbitmap.cpp @@ -7,6 +7,7 @@ #include #include +#include #ifdef DEBUG # include #endif @@ -58,6 +59,7 @@ void CWindowsBitmap::read(std::ifstream& in) if (m_pixeldata != NULL) delete[] m_pixeldata; m_pixeldata = new uint8_t[m_infoheader.biSizeImage]; + assert(m_fileheader.bfOffBits > 0); in.seekg(m_fileheader.bfOffBits); in.read(reinterpret_cast(m_pixeldata), m_infoheader.biSizeImage); } -- cgit v1.2.3