From 44922a1f6bea13ef1758868c0340ada7115664c0 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 30 Sep 2019 12:09:03 -0700 Subject: [PATCH] Fix encoding issue, add note --- BurnOutSharp/ProtectionFind.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/ProtectionFind.cs b/BurnOutSharp/ProtectionFind.cs index e4910eaa..a23eee4a 100644 --- a/BurnOutSharp/ProtectionFind.cs +++ b/BurnOutSharp/ProtectionFind.cs @@ -386,7 +386,7 @@ namespace BurnOutSharp { // Load the current file content string fileContent = null; - using (StreamReader sr = new StreamReader(file)) + using (StreamReader sr = new StreamReader(file, Encoding.Default)) { fileContent = sr.ReadToEnd(); } @@ -560,7 +560,7 @@ namespace BurnOutSharp { // Load the current file content string fileContent = null; - using (StreamReader sr = new StreamReader(stream)) + using (StreamReader sr = new StreamReader(stream, Encoding.Default)) { fileContent = sr.ReadToEnd(); } @@ -647,6 +647,7 @@ namespace BurnOutSharp /// /// Scan the contents of a file for protection /// + /// TODO: This needs to work on a byte array of file content instead of string private static List ScanFileContent(string file, string fileContent) { // Files can be protected in multiple ways