From 3479b4afafdb2bedb3d8dbacf744cd9cdae07e4a Mon Sep 17 00:00:00 2001 From: Fletcher Dunn Date: Tue, 26 Oct 2021 20:13:33 -0700 Subject: [PATCH] Fix bug if string is empty --- src/vstdlib/strtools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vstdlib/strtools.cpp b/src/vstdlib/strtools.cpp index 01aa219..50558c0 100644 --- a/src/vstdlib/strtools.cpp +++ b/src/vstdlib/strtools.cpp @@ -402,7 +402,7 @@ void V_SplitString2( const char *pString, const char * const *pSeparators, int n { outStrings.AddToTail( AllocString( pCurPos, -1 ) ); } - else if (bIncludeEmptyStrings) + else if (bIncludeEmptyStrings && pCurPos > pString) { outStrings.AddToTail( AllocString( "" , 1 )); }