Closed StellarPurr closed 2 years ago
Thank you for the commit! I'll make sure to review it soon 😊
Wow that is a tricky one lol. I hadn't realized that the <= condition wasn't accounted for.
We can actually accomplish the same effect by putting these two lines at the top of the method!
if (input.Length <= commandPrefix.Length) return false;
I am going to add this change on my end and commit it to the master branch. Thank you for finding this bug and fixing it! It's a huge help 😊
That's awesome! Thank you.
In this case, because the input's length is already checked at the top of the method, so I think we don't need the extra if statement here, right? https://github.com/xPanini/TCR-TerrariaChatRelay/blob/4d18887e5dec22e3ef49264cc3384bf8c721c30a/TCR-TerrariaChatRelay/Command/CommandService.cs#L29
Fix
System.ArgumentOutOfRangeException
ifinput.Length < commandPrefix.Length
.