[GRASS-SVN] r45746 - grass-addons/display/d.barb
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 24 17:47:53 EDT 2011
Author: hamish
Date: 2011-03-24 14:47:53 -0700 (Thu, 24 Mar 2011)
New Revision: 45746
Modified:
grass-addons/display/d.barb/draw.c
Log:
fix calloc
Modified: grass-addons/display/d.barb/draw.c
===================================================================
--- grass-addons/display/d.barb/draw.c 2011-03-24 21:43:00 UTC (rev 45745)
+++ grass-addons/display/d.barb/draw.c 2011-03-24 21:47:53 UTC (rev 45746)
@@ -171,10 +171,10 @@
G_debug(4, "draw_circle()");
- n = (int)(360 / step) + 2; /* number of vertices */
+ n = (int)(360 / step) + 1; /* number of vertices */
- xi = G_calloc(n, sizeof(int));
- yi = G_calloc(n, sizeof(int));
+ xi = G_calloc(n + 1, sizeof(int));
+ yi = G_calloc(n + 1, sizeof(int));
/* for loop moving around the circle */
for (i = 0; i <= n; i++) {
More information about the grass-commit
mailing list