Skip to content

Commit

Permalink
Fix for boolean vector bug NA -> TRUE (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
sichoudh authored and swells committed Jul 21, 2016
1 parent a66d693 commit 8b75ec4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Rserve/src/Rserv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,8 @@ static SEXP decode_to_SEXP(unsigned int **buf, int *UPC)
(*UPC)++;
i = 0;
while (i < vl) {
LOGICAL(val)[i] = cb[i];
// LOGICAL(val)[i] = cb[i];
LOGICAL(val)[i] = (cb[i] == 1) ? TRUE : ((cb[i] == 0) ? FALSE : NA_LOGICAL);
i++;
}
while ((i & 3) != 0) i++;
Expand Down

0 comments on commit 8b75ec4

Please sign in to comment.