Skip to content

Commit bad80e0

Browse files
committed
fix wrong param issue
Signed-off-by: jiseong.oh <[email protected]>
1 parent 9adac0c commit bad80e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

backends/samsung/aot/wrappers/op_param_wrapper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class OpParamWrapper {
8383

8484
template <typename T>
8585
void SetVectorValue(const std::vector<T>& value) {
86-
auto bytes = sizeof(std::string::value_type) * value.size();
86+
auto bytes = sizeof(T) * value.size();
8787
storage_ = std::unique_ptr<uint8_t[]>(new uint8_t[bytes]);
8888
memcpy(storage_.get(), value.data(), bytes);
8989
size_ = value.size();
@@ -92,9 +92,9 @@ class OpParamWrapper {
9292
}
9393

9494
void SetStringValue(const std::string& value) {
95-
auto bytes_ = sizeof(std::string::value_type) * value.size();
96-
storage_ = std::unique_ptr<uint8_t[]>(new uint8_t[bytes_]);
97-
memcpy(storage_.get(), value.data(), bytes_);
95+
auto bytes = sizeof(std::string::value_type) * value.size();
96+
storage_ = std::unique_ptr<uint8_t[]>(new uint8_t[bytes]);
97+
memcpy(storage_.get(), value.data(), bytes);
9898
size_ = value.size();
9999
is_scalar_ = false;
100100
scalar_type_ = ScalarType::CHAR;

0 commit comments

Comments
 (0)