mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-18 03:15:08 +00:00
Fix ability to int overflow when adding to LP network (#64)
This commit is contained in:
1 parent
84e41cc920
commit
38f2dbb395
1 file changed
+1
-1
@@ -280,7 +280,7 @@ public class SoulNetworkHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newEss = Math.min(event.maximum, currEss + event.addedAmount);
|
||||
int newEss = (int) Math.min(Integer.MAX_VALUE, Math.min(event.maximum, (long) currEss + event.addedAmount));
|
||||
if (event.getResult() != Event.Result.DENY) {
|
||||
data.currentEssence = newEss;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user