one more small cleanup
authorDiederick Niehorster <dcnieho@gmail.com>
Sun, 22 Apr 2012 16:32:29 +0000 (16:32 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Sun, 22 Apr 2012 16:32:29 +0000 (16:32 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1263 7f0cb862-5218-0410-a997-914c9d46530a

src/fg_geometry.c

index 44b9322..9489a3b 100644 (file)
@@ -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);