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:
Darryl Miles 2024-09-30 07:12:45 +01:00 committed by Tim Edwards
parent 6cae64edc5
commit d6cc790d48
1 changed files with 1 additions and 1 deletions

View File

@ -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