Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
63b60825
Commit
63b60825
authored
Nov 30, 2017
by
Guolin Ke
Browse files
[R] fix EncodeChar
parent
d51f2b4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/lightgbm_R.cpp
src/lightgbm_R.cpp
+2
-1
No files found.
src/lightgbm_R.cpp
View file @
63b60825
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
using
namespace
LightGBM
;
using
namespace
LightGBM
;
LGBM_SE
EncodeChar
(
LGBM_SE
dest
,
const
char
*
src
,
LGBM_SE
buf_len
,
LGBM_SE
actual_len
)
{
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
)
{
if
(
str_len
>
INT32_MAX
)
{
Log
::
Fatal
(
"Don't support large string in R-package."
);
Log
::
Fatal
(
"Don't support large string in R-package."
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment