Skip to content

Commit

Permalink
Index multicolumn STRSXP correctly in firstNonNACol
Browse files Browse the repository at this point in the history
This was missing the column index and so was only checking the first
column no matter the requested column
  • Loading branch information
TomAndrews committed Apr 19, 2018
1 parent 7bd7297 commit e30854a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/na.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static int firstNonNACol (SEXP x, int col)
}
break;
case STRSXP:
for(i=0; i<nr; i++) {
for(i=0+col*nr; i<(nr+col*nr); i++) {
if(STRING_ELT(x, i)!=NA_STRING) {
break;
}
Expand Down

0 comments on commit e30854a

Please sign in to comment.