File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1+ 2017-04-26 Dirk Eddelbuettel <edd@debian.org>
2+
3+ * inst/include/Rcpp/exceptions.h (string_to_try_error): Protect result
4+ from Rf_mkString
5+
162017-04-25 Dirk Eddelbuettel <edd@debian.org>
27
38 * R/Attributes.R (.plugins[["cpp11"]]): If R 3.4.0 or newer is used, set
Original file line number Diff line number Diff line change @@ -291,7 +291,8 @@ inline SEXP string_to_try_error( const std::string& str){
291291 using namespace Rcpp ;
292292
293293 #ifndef RCPP_USING_UTF8_ERROR_STRING
294- Rcpp::Shield<SEXP> simpleErrorExpr ( Rf_lang2 (::Rf_install (" simpleError" ), Rf_mkString (str.c_str ())) );
294+ Rcpp::Shield<SEXP> txt (Rf_mkString (str.c_str ()));
295+ Rcpp::Shield<SEXP> simpleErrorExpr (Rf_lang2 (::Rf_install (" simpleError" ), txt));
295296 Rcpp::Shield<SEXP> tryError ( Rf_mkString ( str.c_str () ) );
296297 #else
297298 Rcpp::Shield<SEXP> tryError ( Rf_allocVector ( STRSXP, 1 ) ) ;
You can’t perform that action at this time.
0 commit comments