Skip to content

Commit

Permalink
Fixed CSV and TSV not loading properly without a final new line
Browse files Browse the repository at this point in the history
  • Loading branch information
thesupersonic16 committed Oct 6, 2024
1 parent f31f83a commit a18391d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions DALTools/DALLib/ImportExport/TranslationCSVFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public string[] ReadCSVRow()
// Add char
buffer += _buffer[_bufferIndex];
}
// Save last split
if (buffer.Length > 0)
splits.Add(buffer.Replace("\r", "").Replace("\\n", "\n"));
return splits.ToArray();
}

Expand Down
3 changes: 3 additions & 0 deletions DALTools/DALLib/ImportExport/TranslationTSVFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public string[] ReadTSVRow()
// Add char
buffer += _buffer[_bufferIndex];
}
// Save last split
if (buffer.Length > 0)
splits.Add(buffer.Replace("\r", "").Replace("\\n", "\n"));
return splits.ToArray();
}

Expand Down

0 comments on commit a18391d

Please sign in to comment.