Merge pull request #11 from Sinisig/crash-fix

Fixed crash in StringFunctions::trim()
This commit is contained in:
Richard Goedeken 2022-06-09 20:09:35 -07:00 committed by GitHub
commit 244f13d3b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,6 +98,12 @@ void trim(string& str, bool left, bool right, const string delims)
//-----------------------------------------------------------------------------
char* trim(char* str, bool left, bool right)
{
// Empty string check
if (*str == '\0')
{
return str;
}
//Trim from the left
if(left)
{