From 876b41bc03c9a92263b824378fc2191f85e0a403 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 18 Sep 2006 15:03:04 +0000 Subject: check for n <= 1 in compute_min_mag_ranges(), bug 8320 --- src/mesa/swrast/s_texfilter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/swrast') 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; -- cgit v1.2.3