mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-06 14:20:39 +01:00
fix out-of-bounds array index (ix=-1)
This commit is contained in:
parent
f00a64999c
commit
22a374fc3f
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.3
|
||||
* Version: 7.0.3
|
||||
*
|
||||
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
*
|
||||
|
|
@ -286,7 +286,7 @@
|
|||
}
|
||||
|
||||
/* skip fragments with zero coverage */
|
||||
while (startX >= 0) {
|
||||
while (startX > 0) {
|
||||
coverage = compute_coveragef(pMin, pMax, pMid, startX, iy);
|
||||
if (coverage > 0.0F)
|
||||
break;
|
||||
|
|
@ -300,6 +300,7 @@
|
|||
/* (cx,cy) = center of fragment */
|
||||
const GLfloat cx = ix + 0.5F, cy = iy + 0.5F;
|
||||
SWspanarrays *array = span.array;
|
||||
ASSERT(ix >= 0);
|
||||
#ifdef DO_INDEX
|
||||
array->coverage[ix] = (GLfloat) compute_coveragei(pMin, pMax, pMid, ix, iy);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue