Skip to content

Commit 52504d6

Browse files
more care in wrap( const char*)
1 parent 36cd8b9 commit 52504d6

File tree

1 file changed

+4
-1
lines changed
  • inst/include/Rcpp/internal

1 file changed

+4
-1
lines changed

inst/include/Rcpp/internal/wrap.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,10 @@ inline SEXP module_wrap<SEXP>( const SEXP& obj ){
921921
}
922922

923923
inline SEXP wrap(const char* const v ){
924-
return Rf_mkString(v) ;
924+
if (v != NULL)
925+
return Rf_mkString(v) ;
926+
else
927+
return R_NilValue;
925928
}
926929

927930
/**

0 commit comments

Comments
 (0)