mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Update custom_ops.cc (#5507)
To fix KernelInfoGetAttrbute_string get string will lose the laster char
This commit is contained in:
parent
ceedf5630b
commit
5a0fdd3537
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ ORT_API_STATUS_IMPL(OrtApis::KernelInfoGetAttribute_string, _In_ const OrtKernel
|
|||
if (*size >= value.size() + 1) {
|
||||
std::memcpy(out, value.data(), value.size());
|
||||
out[value.size()] = '\0';
|
||||
*size = value.size();
|
||||
*size = value.size() + 1;
|
||||
return nullptr;
|
||||
} else {
|
||||
*size = value.size() + 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue