]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
Do a sanity check before reading. Otherwise, if trying to read a duff image file,
[wxWidgets.git] / src / msw / tbar95.cpp
index 772c459e3a05f7c3279532d8a741bacada8c3cae..754543b9329671da41bb2608d9d81ca36ef8fac6 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "tbar95.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -603,7 +599,8 @@ bool wxToolBar::Realize()
         sizeBmp.x = m_defaultWidth;
         sizeBmp.y = m_defaultHeight;
 
-        const wxCoord totalBitmapWidth = m_defaultWidth * nTools,
+        const wxCoord totalBitmapWidth  = m_defaultWidth *
+                                          wx_truncate_cast(wxCoord, nTools),
                       totalBitmapHeight = m_defaultHeight;
 
         // Create a bitmap and copy all the tool bitmaps to it