Skip to content

Commit

Permalink
finish NEWS
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Jun 11, 2024
1 parent 3addbc9 commit 394e220
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
\item Count variables were switches to \code{size_t} to avoid warnings
about conversion-narrowing (Dirk in \ghpr{1307})
\item Rcpp now avoids the usage of the (non-API) DATAPTR function when
accessing the contents of Rcpp Vector objects where possible.
accessing the contents of Rcpp Vector objects where possible. (Kevin in
\ghpr{1310})
\item Rcpp now throws an R error on out-of-bounds Vector accesses. (Kevin
in \ghpr{1310})
}
\item Changes in Rcpp Deployment:
\itemize{
Expand Down
4 changes: 2 additions & 2 deletions inst/include/Rcpp/vector/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ namespace traits{

void check_index(R_xlen_t i) const {
#ifndef RCPP_NO_BOUNDS_CHECK
if (i >= size) {
stop("subscript out of bounds (index %s >= vector size %s)", i, size);
if (i >= p->size()) {
stop("subscript out of bounds (index %s >= vector size %s)", i, p->size());
}
#endif
}
Expand Down

0 comments on commit 394e220

Please sign in to comment.