Skip to content

Commit ff8e9cc

Browse files
Fix signed 32 bit int overflow
1 parent 012ed05 commit ff8e9cc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ReplayBrowser/Data/Models/Replay.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ public class Replay : IEntityTypeConfiguration<Replay>
2828
public List<ReplayParticipant>? RoundParticipants { get; set; }
2929
public string? RoundEndText { get; set; }
3030
public required string ServerId { get; set; }
31+
// Doesn't need to be a long because at 30TPS that's 828 days.
32+
// Unless we get round saving and it restores the tick count?
33+
// - November 2024
3134
public int EndTick { get; set; }
3235
public required string Duration { get; set; }
3336
public int FileCount { get; set; }
34-
public int Size { get; set; }
35-
public int UncompressedSize { get; set; }
37+
public long Size { get; set; }
38+
public long UncompressedSize { get; set; }
3639
public required string EndTime { get; set; }
3740

3841
[JsonIgnore]

ReplayBrowser/Models/Ingested/YamlReplay.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class YamlReplay {
2525
public int EndTick { get; set; }
2626
public required string Duration { get; set; }
2727
public int FileCount { get; set; }
28-
public int Size { get; set; }
29-
public int UncompressedSize { get; set; }
28+
public long Size { get; set; }
29+
public long UncompressedSize { get; set; }
3030
public required string EndTime { get; set; }
3131
}

0 commit comments

Comments
 (0)