Skip to content

Commit

Permalink
Merge pull request #7 from shenchai/feature_fix_memset
Browse files Browse the repository at this point in the history
fix memset to '0' for zerofill
  • Loading branch information
oceanbase-admin committed Jun 7, 2021
2 parents c0dff15 + 1997575 commit 74bc6db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/ob_obj_cast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static int copy_string(const ObObjCastParams &params,
} else {
int64_t zf = params.zf_info_->max_length_ - len;
if (zf > 0) {
MEMSET(buf, 0, zf);
MEMSET(buf, '0', zf);
MEMCPY(buf + zf, str, len);
len = str_len; // set string length
} else {
Expand Down

0 comments on commit 74bc6db

Please sign in to comment.