Skip to content

Commit a0b0295

Browse files
committed
0 gameticks is a valid gameTime for checkpoints
1 parent 8221775 commit a0b0295

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

HCMExternal/Converters/IGTConverter.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
1616
}
1717

1818
int gameTicks = (int)value;
19-
if (gameTicks <= 0) // To avoid dividing 0 later. Should never be negative unless there was an error reading the checkpoint data.
19+
if (gameTicks < 0) // To avoid dividing 0 later. Should never be negative unless there was an error reading the checkpoint data.
2020
{
2121
return "???";
2222
}
23+
else if (gameTicks == 0)
24+
{
25+
return "00:00";
26+
}
2327

2428
// So I'd like this to check what the current tab index is directly, but haven't figured out how.
2529
// ConverterParameter won't seem to work since this is from a control under the tab control.

0 commit comments

Comments
 (0)