summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-09-18 15:03:04 +0000
committerBrian Paul <[email protected]>2006-09-18 15:03:04 +0000
commit876b41bc03c9a92263b824378fc2191f85e0a403 (patch)
tree80c38dbcfc04a73416407a58de9d41f8c6907a53
parentf7da4e687c4ed81495b532f3a43e0efdc32fea37 (diff)
check for n <= 1 in compute_min_mag_ranges(), bug 8320
-rw-r--r--src/mesa/swrast/s_texfilter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 629b4ec1369..f55e23422d4 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -590,13 +590,13 @@ compute_min_mag_ranges(const struct gl_texture_object *tObj,
}
#endif /* DEBUG */
- if (lambda[0] <= minMagThresh && lambda[n-1] <= minMagThresh) {
+ if (lambda[0] <= minMagThresh && (n <= 1 || lambda[n-1] <= minMagThresh)) {
/* magnification for whole span */
*magStart = 0;
*magEnd = n;
*minStart = *minEnd = 0;
}
- else if (lambda[0] > minMagThresh && lambda[n-1] > minMagThresh) {
+ else if (lambda[0] > minMagThresh && (n <=1 || lambda[n-1] > minMagThresh)) {
/* minification for whole span */
*minStart = 0;
*minEnd = n;