Check of minimum number of points #1

Merged
cromer merged 1 commits from minpoints into master 2018-12-08 23:28:37 -03:00

View File

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