mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
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:
committed by
Tim Edwards
co-authored by
Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
parent
6cae64edc5
commit
d6cc790d48
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user