Forráskód Böngészése

Fix allocation error

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47136 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 13 éve
szülő
commit
90d9e5d79a
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      lib/gis/parser.c

+ 1 - 1
lib/gis/parser.c

@@ -1370,6 +1370,6 @@ static void split_gisprompt(const char *gisprompt, char *age, char *element,
 
 static void append_error(const char *msg)
 {
-    st->error = G_realloc(st->error, sizeof(char *) * st->n_errors + 1);
+    st->error = G_realloc(st->error, sizeof(char *) * (st->n_errors + 1));
     st->error[st->n_errors++] = G_store(msg);
 }