1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-17 07:44:09 +02:00

Fixed off-by-one with string split

This commit is contained in:
Brian Fiete 2020-12-02 13:22:50 -08:00
parent bdd22c0154
commit 701abe3af7

View file

@ -2667,7 +2667,7 @@ namespace System
if (foundMatch) if (foundMatch)
{ {
if ((mMatchPos > mPos + 1) || (!mSplitOptions.HasFlag(StringSplitOptions.RemoveEmptyEntries))) if ((mMatchPos >= mPos + 1) || (!mSplitOptions.HasFlag(StringSplitOptions.RemoveEmptyEntries)))
return true; return true;
mPos = mMatchPos + 1; mPos = mMatchPos + 1;
if (mPos >= mStrLen) if (mPos >= mStrLen)