Skip to content

Commit

Permalink
fixed encodings not being detected correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraballa committed Jun 17, 2020
1 parent 65b868c commit 857607c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FDFEditor/Backend/Crypt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public enum Game
public static string ReadFromFile(string path, bool fdf1 = false, int type = 2)
{
byte[] content = File.ReadAllBytes(path);
return Encoding.UTF8.GetString(TransformBuffer(content, true, fdf1, type));
return new StreamReader(new MemoryStream(TransformBuffer(content, true, fdf1, type))).ReadToEnd();
}

public static byte[] TransformBuffer(byte[] buffer, bool decrypt = true, bool fdf1 = false, int type = 2)
Expand Down

0 comments on commit 857607c

Please sign in to comment.