extflat/EFvisit.c: Multiplication result converted to larger type
Fix code scanning alert no. 50: Multiplication result converted to larger type (#51) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
6cae64edc5
commit
d6cc790d48
|
|
@ -789,7 +789,7 @@ EFNodeResist(node)
|
|||
if (v < 0.0) s = 0.0; else s = sqrt(v);
|
||||
|
||||
fperim = (float) perim;
|
||||
dresist = (fperim + s)/(fperim - s) * efResists[n];
|
||||
dresist = ((double)fperim + (double)s)/((double)fperim - (double)s) * efResists[n];
|
||||
if (dresist + (double) resist > (double) INT_MAX)
|
||||
resist = INT_MAX;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue