mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Cast up to get rid of the potential overflow posibility
This commit is contained in:
parent
1220556f33
commit
1d6a490c2c
Notes:
git
2021-10-14 18:43:59 +09:00
1 changed files with 1 additions and 1 deletions
|
@ -5034,7 +5034,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
|
|||
|
||||
if (NSTRING_IS_DONT_GET_OPT_INFO(node)) {
|
||||
int n = onigenc_strlen(env->enc, sn->s, sn->end);
|
||||
max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * n;
|
||||
max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * (OnigDistance)n;
|
||||
}
|
||||
else {
|
||||
concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
|
||||
|
|
Loading…
Add table
Reference in a new issue