summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/map/if/ifCut.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index 9d884e75..52603671 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -934,7 +934,11 @@ float If_CutAreaFlow( If_Man_t * p, If_Cut_t * pCut )
if ( Flow >= (float)1e32 || AddOn >= (float)1e32 )
Flow = (float)1e32;
else
+ {
Flow += AddOn;
+ if ( Flow > (float)1e32 )
+ Flow = (float)1e32;
+ }
}
return Flow;
}
@@ -968,7 +972,11 @@ float If_CutEdgeFlow( If_Man_t * p, If_Cut_t * pCut )
if ( Flow >= (float)1e32 || AddOn >= (float)1e32 )
Flow = (float)1e32;
else
+ {
Flow += AddOn;
+ if ( Flow > (float)1e32 )
+ Flow = (float)1e32;
+ }
}
return Flow;
}