]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/region.cpp
more backwards compatibility for printing
[wxWidgets.git] / src / msw / region.cpp
index e26d294ce764c71ac6a777b887082697f71b3216..56846e68ddd58aad58cb330d1e4c7895a8e452dd 100644 (file)
@@ -351,13 +351,13 @@ void wxRegionIterator::Reset(const wxRegion& region)
 
         m_rects = new wxRect[header->nCount];
 
-        RECT* rect = (RECT*) (rgnData + sizeof(RGNDATAHEADER)) ;
+        RECT* rect = (RECT*) ((char*)rgnData + sizeof(RGNDATAHEADER)) ;
         size_t i;
         for (i = 0; i < header->nCount; i++)
         {
             m_rects[i] = wxRect(rect->left, rect->top,
                                  rect->right - rect->left, rect->bottom - rect->top);
-            rect += sizeof(RECT);
+            rect ++; // Advances pointer by sizeof(RECT)
         }
 
         m_numRects = header->nCount;