fix crash when last step duration is at 0
This commit is contained in:
1 parent
483ddd950f
commit
5594f91d5b
1 file changed
+1
-1
@@ -831,7 +831,7 @@ main() {
|
||||
|
||||
if (Last_Timer_Update < Now) {
|
||||
Last_Timer_Update = Now + 100;
|
||||
if (MatchManagerPickAndBan_State.startTimestamp != 0 && MatchManagerPickAndBan_State.endTimestamp != 0) {
|
||||
if (MatchManagerPickAndBan_State.startTimestamp != 0 && MatchManagerPickAndBan_State.endTimestamp != 0 && MatchManagerPickAndBan_State.startTimestamp != MatchManagerPickAndBan_State.endTimestamp) {
|
||||
declare Integer RemainingTime = ML::Max(MatchManagerPickAndBan_State.endTimestamp - TL::ToInteger(TiL::GetCurrent()), 0);
|
||||
Label_Timer.Value = ""^ RemainingTime;
|
||||
declare Real Width = RemainingTime * 232. / (MatchManagerPickAndBan_State.endTimestamp - MatchManagerPickAndBan_State.startTimestamp);
|
||||
|
||||
Reference in new issue
Block a user