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
@ -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…
x
Reference in New Issue
Block a user