浏览代码

v.net.visibility: fix coordinates parameter (#1336)

Since it is approved, I take the liberty to merge.
Andrea Giudiceandrea 4 年之前
父节点
当前提交
bd9fc01013
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      vector/v.net.visibility/main.c

+ 4 - 2
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));