Skip to content

Commit 130829b

Browse files
safe change in %notin%
1 parent 91044b9 commit 130829b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/negate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ void negateByRef(SEXP x) {
55
error("not logical or integer vector"); // # nocov
66
}
77
const int n = length(x);
8-
Rboolean *ansd = (Rboolean *)LOGICAL(x);
8+
int *ansd = (int *)LOGICAL(x);
99
for(int i=0; i<n; ++i) {
1010
ansd[i] ^= (ansd[i] != NA_LOGICAL); // invert true/false but leave NA alone
1111
}

0 commit comments

Comments
 (0)