Fix compiler warning [-Wmaybe-uninitialized]

Fl_BMP_Image.cxx:228:30: warning: ‘width’ may be used uninitialized in this function
  228 |       int maskSize = (((width*Bpp+3)&~3)*height) + ...
      |                         ~~~~~^~~~
This commit is contained in:
Albrecht Schlosser 2022-12-13 15:51:54 +01:00
parent 0e3acd27fb
commit b82ea16d69

View File

@ -205,7 +205,8 @@ void Fl_BMP_Image::load_bmp_(Fl_Image_Reader &rdr, int ico_height, int ico_width
height = ico_height;
} else {
// New BMP header...
w(rdr.read_long());
width = rdr.read_long();
w(width);
// If the height is negative, the row order is flipped
temp = rdr.read_long();
if (temp < 0) row_order = 1;