summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimagereader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qimagereader.cpp')
-rw-r--r--src/gui/image/qimagereader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 2f25f4dcbc..d01f0d640b 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;
}
}