diff options
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qbmphandler.cpp | 6 | ||||
-rw-r--r-- | src/gui/image/qbmphandler_p.h | 2 | ||||
-rw-r--r-- | src/gui/image/qimagereader.cpp | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 9545abfd21..324fe01414 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -183,14 +183,14 @@ static bool read_dib_infoheader(QDataStream &s, BMP_INFOHDR &bi) return true; } -static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int startpos, QImage &image) +static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, qint64 offset, qint64 startpos, QImage &image) { QIODevice* d = s.device(); if (d->atEnd()) // end of stream/file return false; #if 0 - qDebug("offset...........%d", offset); - qDebug("startpos.........%d", startpos); + qDebug("offset...........%lld", offset); + qDebug("startpos.........%lld", startpos); qDebug("biSize...........%d", bi.biSize); qDebug("biWidth..........%d", bi.biWidth); qDebug("biHeight.........%d", bi.biHeight); diff --git a/src/gui/image/qbmphandler_p.h b/src/gui/image/qbmphandler_p.h index 7d3cbab322..3e1fc3d511 100644 --- a/src/gui/image/qbmphandler_p.h +++ b/src/gui/image/qbmphandler_p.h @@ -121,7 +121,7 @@ private: State state; BMP_FILEHDR fileHeader; BMP_INFOHDR infoHeader; - int startpos; + qint64 startpos; }; QT_END_NAMESPACE diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 55c3a4704a..cd7c95b166 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -471,7 +471,8 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device, --numFormats; ++currentFormat; - currentFormat %= _qt_NumFormats; + if (currentFormat >= _qt_NumFormats) + currentFormat = 0; } } |