small fix in the C dump code

This commit is contained in:
El Potaeto 2015-01-09 11:52:40 +01:00
parent 31d0e8f65d
commit d96bd15b7d

View File

@ -281,7 +281,8 @@ extern "C" {
&olen);
SEXP out = PROTECT(allocVector(STRSXP, olen));
char buffer [2000];
for (size_t i = 0; i < olen; ++i) {
for (size_t i = 0; i < olen; ++i) {
memset(buffer, 0, sizeof buffer);
sprintf (buffer, "booster[%u]:\n%s", static_cast<unsigned>(i), res[i]);
SET_STRING_ELT(out, i, mkChar(buffer));
}