Skip to content

Commit

Permalink
v.net.visibility: fix coordinates parameter (#1336)
Browse files Browse the repository at this point in the history
Since it is approved, I take the liberty to merge.
  • Loading branch information
agiudiceandrea authored and neteler committed May 6, 2021
1 parent 400ae05 commit 07e2f6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vector/v.net.visibility/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ int main(int argc, char *argv[])
count(&in, &num_points, &num_lines);

/* modify the number if we have new points to add */
if (coor->answers != NULL)
num_points += count_new(coor->answers);
if (coor->answers != NULL) {
n = count_new(coor->answers);
num_points += n;
}

/* and allocate */
points = G_malloc(num_points * sizeof(struct Point));
Expand Down

0 comments on commit 07e2f6b

Please sign in to comment.