Skip to content

Commit

Permalink
"Fix" crashing graph generation
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed May 21, 2024
1 parent 36479c6 commit dc2dfca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TMTurboRecords/TMTurboRecords/Services/RecordService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,11 @@ private static RecordDistributionGraph GetRecordDistributionGraph(List<RankedRec

graph.X = new string[graph.Y.Max(x => x.Value.Length)];

var reverseDict = xs.ToDictionary(x => x.Value, x => x.Key);
var reverseDict = new Dictionary<int, int>();
foreach (var pair in xs)
{
reverseDict[pair.Value] = pair.Key;
}

for (var i = 0; i < graph.X.Length; i++)
{
Expand Down

0 comments on commit dc2dfca

Please sign in to comment.