Skip to content

Commit

Permalink
Fix very rare case of false match during join (#2515)
Browse files Browse the repository at this point in the history
* fix typo

* NEWS
  • Loading branch information
krlmlr committed Mar 9, 2017
1 parent d8bfcce commit d350569
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# dplyr 0.5.0.9000

* Fixed very rare case of false match during join (#2515).

* Restricted workaround for `match()` to R 3.3.0. (#1858).

* dplyr now warns on load when the version of R or Rcpp during installation is
Expand Down
2 changes: 1 addition & 1 deletion inst/include/dplyr/JoinVisitorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace dplyr {
if (i>=0 && j>=0) {
return comparisons<LHS_RTYPE>().equal_or_both_na(left[i], left[j]);
} else if (i < 0 && j < 0) {
return comparisons<LHS_RTYPE>().equal_or_both_na(right[-i-1], right[-j-1]);
return comparisons<RHS_RTYPE>().equal_or_both_na(right[-i-1], right[-j-1]);
} else if (i >= 0 && j < 0) {
return comparisons_different<LHS_RTYPE,RHS_RTYPE>().equal_or_both_na(left[i], right[-j-1]);
} else {
Expand Down

0 comments on commit d350569

Please sign in to comment.