Skip to content

Commit

Permalink
Fixed minor issue with CSV parsing so that unix/windows line breaks d…
Browse files Browse the repository at this point in the history
…on't matter.
  • Loading branch information
AMacro committed May 11, 2024
1 parent 3edb410 commit 764bfc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Multiplayer/Utils/Csv.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -14,7 +15,8 @@ public static class Csv
/// </summary>
public static ReadOnlyDictionary<string, Dictionary<string, string>> Parse(string data)
{
string[] lines = data.Split('\n');
string[] separators = new string[]{"\r\n" };
string[] lines = data.Split(separators, StringSplitOptions.None);

// Dictionary<string, Dictionary<string, string>>
OrderedDictionary columns = new(lines.Length - 1);
Expand Down

0 comments on commit 764bfc7

Please sign in to comment.