From 82126b9b2114e0be1d16dbdea7bbf6a17c9cad2e Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 26 Jan 2007 19:48:36 +0000 Subject: Fixed Issue 267: class DDSImage return incorrect mipmap level data. Applied recommended fix from submitter. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1107 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/util/texture/spi/DDSImage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3