fix crash when last step duration is at 0

This commit is contained in:
beu
2026-08-19 23:25:36 +02:00
parent 483ddd950f
commit 5594f91d5b
+1 -1
View File
@@ -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);