aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/util/texture
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/util/texture')
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/spi/DDSImage.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/util/texture/spi/DDSImage.java b/src/classes/com/sun/opengl/util/texture/spi/DDSImage.java
index 12a855c57..8680ada1c 100755
--- a/src/classes/com/sun/opengl/util/texture/spi/DDSImage.java
+++ b/src/classes/com/sun/opengl/util/texture/spi/DDSImage.java
@@ -722,7 +722,7 @@ public class DDSImage {
for (int i = 0; i < map; i++) {
width >>= 1;
}
- return width;
+ return Math.max(width, 1);
}
private int mipMapHeight(int map) {
@@ -730,7 +730,7 @@ public class DDSImage {
for (int i = 0; i < map; i++) {
height >>= 1;
}
- return height;
+ return Math.max(height, 1);
}
private int mipMapSizeInBytes(int map) {