Typo in ALLLOCATE_LOCAL() arguments, causing mis-computation of the buffer.

Bugzilla #6642.
This commit is contained in:
Matthieu Herrb
2006-05-02 14:09:30 +00:00
parent 1e8a594957
commit b9a9cf6185
2 changed files with 8 additions and 2 deletions

View File

@@ -145,7 +145,7 @@ miTriStrip (CARD8 op,
if (npoint < 3)
return;
ntri = npoint - 2;
tris = ALLOCATE_LOCAL (ntri & sizeof (xTriangle));
tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
if (!tris)
return;
for (tri = tris; npoint >= 3; npoint--, points++, tri++)
@@ -177,7 +177,7 @@ miTriFan (CARD8 op,
if (npoint < 3)
return;
ntri = npoint - 2;
tris = ALLOCATE_LOCAL (ntri & sizeof (xTriangle));
tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
if (!tris)
return;
first = points++;