We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be96204 commit f82ac81Copy full SHA for f82ac81
inst/include/RcppEigenWrap.h
@@ -88,11 +88,11 @@ namespace Rcpp{
88
T::ColsAtCompileTime>,
89
const T&>::type objCopy(obj);
90
R_xlen_t m = obj.rows(), n = obj.cols(), size = m * n;
91
+ if (m > INT_MAX || n > INT_MAX) {
92
+ Rcpp::stop("array dimensions cannot exceed INT_MAX");
93
+ }
94
SEXP ans = PROTECT(::Rcpp::wrap(objCopy.data(), objCopy.data() + size));
95
if ( T::ColsAtCompileTime != 1 ) {
- if (m > INT_MAX || n > INT_MAX) {
- Rcpp::stop("array dimensions cannot exceed INT_MAX");
- }
96
SEXP dd = PROTECT(::Rf_allocVector(INTSXP, 2));
97
int *d = INTEGER(dd);
98
d[0] = m;
0 commit comments