From 1de78e0e4c3f3cea526d5c91e85cdfc6255d11c9 Mon Sep 17 00:00:00 2001 From: FenPhoenix Date: Fri, 3 May 2019 13:45:57 -0700 Subject: [PATCH] Cleanup --- AngelLoader/CustomControls/RichTextBoxCustom.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/AngelLoader/CustomControls/RichTextBoxCustom.cs b/AngelLoader/CustomControls/RichTextBoxCustom.cs index 546f42231..485fc3a2b 100644 --- a/AngelLoader/CustomControls/RichTextBoxCustom.cs +++ b/AngelLoader/CustomControls/RichTextBoxCustom.cs @@ -185,7 +185,7 @@ instances of "\shppict" and "\nonshppict" with dummy strings. This fixes the pro my lawn. */ - internal static bool ReplaceByteSequence(byte[] input, byte[] pattern, byte[] replacePattern) + internal static void ReplaceByteSequence(byte[] input, byte[] pattern, byte[] replacePattern) { var firstByte = pattern[0]; int index = Array.IndexOf(input, firstByte); @@ -195,10 +195,10 @@ internal static bool ReplaceByteSequence(byte[] input, byte[] pattern, byte[] re { for (int i = 0; i < pLen; i++) { - if (index + i >= input.Length) return false; + if (index + i >= input.Length) return; if (pattern[i] != input[index + i]) { - if ((index = Array.IndexOf(input, firstByte, index + i)) == -1) return false; + if ((index = Array.IndexOf(input, firstByte, index + i)) == -1) return; break; } @@ -211,8 +211,6 @@ internal static bool ReplaceByteSequence(byte[] input, byte[] pattern, byte[] re } } } - - return index > -1; } #region GLML to RTF