diff options
Diffstat (limited to 'src/Fl_ICO_Image.cxx')
| -rw-r--r-- | src/Fl_ICO_Image.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Fl_ICO_Image.cxx b/src/Fl_ICO_Image.cxx index 9de71737b..301dc86e6 100644 --- a/src/Fl_ICO_Image.cxx +++ b/src/Fl_ICO_Image.cxx @@ -96,7 +96,8 @@ void Fl_ICO_Image::load_ico_(Fl_Image_Reader &rdr, int id) icondirentry_ = new IconDirEntry[idcount()]; - for (int i = 0; i < idcount(); ++i) { + int i; + for (i = 0; i < idcount(); ++i) { icondirentry_[i].bWidth = (int)rdr.read_byte(); icondirentry_[i].bHeight = (int)rdr.read_byte(); icondirentry_[i].bColorCount = (int)rdr.read_byte(); @@ -120,7 +121,7 @@ void Fl_ICO_Image::load_ico_(Fl_Image_Reader &rdr, int id) if (id == -1) { // pick icon with highest resolution + highest bitcount int highestRes = 0, bitcount = 0; - for (int i = 0; i < idcount(); ++i) { + for (i = 0; i < idcount(); ++i) { int res = icondirentry_[i].bWidth * icondirentry_[i].bHeight; if (res > highestRes || (res == highestRes && icondirentry_[i].wBitCount > bitcount)) { highestRes = res; @@ -147,7 +148,7 @@ void Fl_ICO_Image::load_ico_(Fl_Image_Reader &rdr, int id) // Check for a PNG image resource uchar b[8]; - for (int i=0; i<8; ++i) b[i] = rdr.read_byte(); + for (i =0; i<8; ++i) b[i] = rdr.read_byte(); if (b[0]==0x89 && b[1]=='P' && b[2]=='N' && b[3]=='G' && b[4]=='\r' && b[5]=='\n' && b[6]==0x1A && b[7]=='\n') |
