Browse Source

Fix allocation bug (wrong pointer type in "sizeof")

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48484 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 13 years ago
parent
commit
a4f42ffa5e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/gis/rd_cellhd.c

+ 1 - 1
lib/gis/rd_cellhd.c

@@ -66,7 +66,7 @@ void G__read_Cell_head(FILE * fd, struct Cell_head *cellhd, int is_cellhd)
     while (G_getl(buf, sizeof(buf), fd))
 	count++;
 
-    array = (char **)G_calloc(count + 1, sizeof(char **));
+    array = (char **)G_calloc(count + 1, sizeof(char *));
 
     count = 0;
     G_fseek(fd, 0L, 0);