summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-02-24 13:55:50 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-02-24 13:55:50 +1000
commit97b2bfdbe1b242b2d7cdd88ce3648388e8764e1c (patch)
tree4532dbff99464f6fe675686fc665564b82aa349c /src/opengl
parent9b21487794b3984b5075f03e5639a8c4bf5f2813 (diff)
Fix off-by-one error in mipmap count when loading PVRTC files
Task-number: QT-2988 Reviewed-by: Julian de Bhal
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 22b0602a6d..ca898c7552 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -5451,7 +5451,7 @@ QSize QGLTexture::bindCompressedTexturePVR(const char *buf, int len)
quint32 level = 0;
quint32 width = pvrHeader->width;
quint32 height = pvrHeader->height;
- while (bufferSize > 0 && level < pvrHeader->mipMapCount) {
+ while (bufferSize > 0 && level <= pvrHeader->mipMapCount) {
quint32 size =
(qMax(width, minWidth) * qMax(height, minHeight) *
pvrHeader->bitsPerPixel) / 8;