Skip to content

Commit

Permalink
Fix newlines not appearing in the description TextBox
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsPepperpot committed Aug 7, 2024
1 parent 48da70a commit da6affc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IndustrialPark/Other/GameCubeBanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public static GameCubeBanner ImportFromFile(string filePath)
// Read description
var description = new byte[0x80];
fileStream.Read(description, 0, 0x80);
banner.Description = Encoding.ASCII.GetString(description).TrimEnd('\0');
banner.Description = Encoding.ASCII.GetString(description).TrimEnd('\0').Replace("\n", "\r\n");

// Close filestream
fileStream.Close();
Expand Down Expand Up @@ -326,7 +326,7 @@ public bool SaveToFile(string filepath)

// Write the description
fileStream.Position = 0x18E0;
var description = Encoding.ASCII.GetBytes(Description);
var description = Encoding.ASCII.GetBytes(Description.Replace("\r\n", "\n"));
fileStream.Write(description, 0, description.Length);

// Ensure file length is 0x195F
Expand Down

0 comments on commit da6affc

Please sign in to comment.