Commit 63b60825 authored by Guolin Ke's avatar Guolin Ke
Browse files

[R] fix EncodeChar

parent d51f2b4f
......@@ -33,7 +33,8 @@
using namespace LightGBM;
LGBM_SE EncodeChar(LGBM_SE dest, const char* src, LGBM_SE buf_len, LGBM_SE actual_len) {
size_t str_len = std::strlen(src);
// +1 for '\0'
size_t str_len = std::strlen(src) + 1;
if (str_len > INT32_MAX) {
Log::Fatal("Don't support large string in R-package.");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment