From: Diederick Niehorster Date: Sun, 22 Apr 2012 16:32:29 +0000 (+0000) Subject: one more small cleanup X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;ds=sidebyside;h=93284cce995c8be6950de7858c5200013e63afa0;p=freeglut one more small cleanup git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1263 7f0cb862-5218-0410-a997-914c9d46530a --- 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);