Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FenPhoenix committed May 3, 2019
1 parent aa9df56 commit 1de78e0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions AngelLoader/CustomControls/RichTextBoxCustom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand All @@ -211,8 +211,6 @@ internal static bool ReplaceByteSequence(byte[] input, byte[] pattern, byte[] re
}
}
}

return index > -1;
}

#region GLML to RTF
Expand Down

0 comments on commit 1de78e0

Please sign in to comment.