Skip to content

Commit

Permalink
Fix rendering of unreadable characters in map signs
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Mar 10, 2022
1 parent e5a3118 commit 5356fc4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions EOLib/Domain/Map/Sign.cs
@@ -1,4 +1,5 @@
using EOLib.IO.Map;
using System.Linq;

namespace EOLib.Domain.Map
{
Expand All @@ -10,8 +11,13 @@ public class Sign : ISign

public Sign(SignMapEntity sign)
{
Title = sign.Title;
Message = sign.Message;
Title = Filter(sign.Title);
Message = Filter(sign.Message);
}

private static string Filter(string input)
{
return new string(input.Where(x => !char.IsControl(x)).ToArray());
}
}

Expand Down

0 comments on commit 5356fc4

Please sign in to comment.