Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
* inst/tinytest/cpp/coerce.cpp: add coerce unit tests
* inst/tinytest/test_coerce.R: idem

2022-10-25 Dirk Eddelbuettel <edd@debian.org>

* inst/include/Rcpp/internal/r_coerce.h (coerce_to_string<RAWSXP >):
Replace last remaining sprintf with snprintf

2022-10-12 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version
Expand Down
6 changes: 3 additions & 3 deletions inst/include/Rcpp/internal/r_coerce.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ inline const char* coerce_to_string<REALSXP>(double x){
template <>
inline const char* coerce_to_string<INTSXP >(int from) {
static char buffer[NB] ;
snprintf( buffer, NB, "%*d", integer_width(from), from );
snprintf(buffer, NB, "%*d", integer_width(from), from);
return buffer ;
}
template <>
inline const char* coerce_to_string<RAWSXP >(Rbyte from){
static char buff[3];
::sprintf(buff, "%02x", from);
return buff ;
snprintf(buff, 3, "%02x", from);
return buff;
}
template <>
inline const char* coerce_to_string<LGLSXP >(int from){
Expand Down