Skip to content

Commit

Permalink
safeguard for reused column name
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfrantz authored Jul 31, 2024
1 parent e4a7230 commit 8ee7396
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aux-level/_stratified-sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ OGRGeometryH point;
if ((col_count = find_table_col(&sample_size, "count")) < 0){
printf("could not find column name %s in file-sample-size\n", "count"); exit(FAILURE);}

if (col_size == col_class || col_size == col_count){
printf("third column name cannot be class or count\n"); exit(FAILURE);}

#ifdef FORCE_DEBUG
print_table(&sample_size, false, false);
printf("column %s in column %d\n", "class", col_class);
Expand Down

0 comments on commit 8ee7396

Please sign in to comment.