Add null check in isempty function

This commit is contained in:
EnderIce2 2024-04-03 01:40:38 +03:00
parent daccdaeeae
commit c76eb67883
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -341,8 +341,12 @@ EXTERNC int isspace(int c)
EXTERNC int isempty(char *str)
{
if (str == NULL)
return 1;
if (strlen(str) == 0)
return 1;
while (*str != '\0')
{
if (!isspace(*str))