Browse Source

check for minimum of 2 points

pull/1/head
Chris Cromer 2 years ago
parent
commit
0edcd7f4a8
Signed by: cromer GPG Key ID: 39CC813FF3C8708A
  1. 2
      src/read_file.c

2
src/read_file.c

@ -250,7 +250,7 @@ int read_file(char *filename, point_t **points, unsigned int *n) {
buffer = NULL;
size = 0;
}
if (j < *n) {
if (j < *n || *n < 2) {
fprintf(stderr, "Error: No hay suficiente puntos!\n");
return 9;
}

Loading…
Cancel
Save