Skip to content

Commit

Permalink
more bad merges
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jul 26, 2024
1 parent 3e649fa commit d18295b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/read_workbook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,14 @@ SEXP read_workbook(IntegerVector cols_in,

if(missing_header[i]){ // a missing header element

snprintf(&(name[0]), 6, "X%d", i+1);
snprintf(&(name[0]), 6, "X%hu", i+1);
col_names[i] = name;

}else{ // this is a header elements

col_names[i] = v[pos];
if(col_names[i] == "NA"){
snprintf(&(name[0]), 6, "X%d", i+1);
snprintf(&(name[0]), 6, "X%hu", i+1);
col_names[i] = name;
}

Expand Down Expand Up @@ -617,7 +617,7 @@ SEXP read_workbook(IntegerVector cols_in,
}else{ // else col_names is FALSE
char name[6];
for(int i =0; i < nCols; i++){
snprintf(&(name[0]), 6, "X%d", i+1);
snprintf(&(name[0]), 6, "X%hu", i+1);
col_names[i] = name;
}
}
Expand Down

0 comments on commit d18295b

Please sign in to comment.