Skip to content

Commit

Permalink
fix memset to '0' for zerofill
Browse files Browse the repository at this point in the history
  • Loading branch information
shenchai committed Jun 7, 2021
1 parent c0dff15 commit 1997575
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 1997575

Please sign in to comment.