X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_geometry.c;h=9489a3bc005a6a72e934b60aaed51c52d69b848e;hb=93284cce995c8be6950de7858c5200013e63afa0;hp=44b9322fd4076925f560586a6115800d520f423c;hpb=3d924d7d4f041c56f02720554514bdcb5b989579;p=freeglut diff --git a/src/fg_geometry.c b/src/fg_geometry.c index 44b9322..9489a3b 100644 --- a/src/fg_geometry.c +++ b/src/fg_geometry.c @@ -1376,8 +1376,8 @@ static void fghCone( double base, double height, GLint slices, GLint stacks, GLb * bunch for each slice. */ - stackIdx = malloc(slices*(stacks+1)*sizeof(GLushort)); - sliceIdx = malloc(slices*2 *sizeof(GLushort)); + stackIdx = malloc(slices*stacks*sizeof(GLushort)); + sliceIdx = malloc(slices*2 *sizeof(GLushort)); if (!(stackIdx) || !(sliceIdx)) { free(stackIdx);