Skip to content

Commit

Permalink
Quick fix for fread type bump seg fault
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdowle committed Sep 27, 2014
1 parent d545394 commit 83a5b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fread.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static SEXP coerceVectorSoFar(SEXP v, int oldtype, int newtype, R_len_t sofar, R
col+1, TypeName[oldtype], TypeName[newtype], sofar+1, MsgLimit(lch-ch), ch);
if (sizes[TypeSxp[oldtype]]<4) {sprintf(errormsg,"Internal error: SIZEOF oldtype %d < 4", oldtype); EXIT();}
if (sizes[TypeSxp[newtype]]<4) {sprintf(errormsg,"Internal error: SIZEOF newtype %d < 4", newtype); EXIT();}
if (sizes[TypeSxp[oldtype]] == sizes[TypeSxp[newtype]]) {
if (sizes[TypeSxp[oldtype]] == sizes[TypeSxp[newtype]] && newtype != SXP_STR) {
TYPEOF(v) = TypeSxp[newtype];
newv=v;
} else {
Expand Down

0 comments on commit 83a5b18

Please sign in to comment.