From 5486bbdae4eb139e0370dcbe893ab58a4fcb5419 Mon Sep 17 00:00:00 2001 From: Andrea Giudiceandrea Date: Thu, 6 May 2021 21:02:04 +0200 Subject: [PATCH] v.net.visibility: fix coordinates parameter (#1336) Since it is approved, I take the liberty to merge. --- vector/v.net.visibility/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vector/v.net.visibility/main.c b/vector/v.net.visibility/main.c index e5748b96b45..8cc87c50be2 100644 --- a/vector/v.net.visibility/main.c +++ b/vector/v.net.visibility/main.c @@ -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));