* check zero length instead of comparing to empty string

This commit is contained in:
Michael VAN CANNEYT 2023-01-06 11:54:15 +01:00 committed by Pierre Muller
parent 18717aaec5
commit abb65bc2e5

View File

@ -201,7 +201,7 @@ begin
S := GetEnv ('HOME');
{$ENDIF FPC_FEXPAND_GETENV_PCHAR}
{$ENDIF FPC_FEXPAND_SYSUTILS}
if (S = '') or (Length (S) = 1) and (Length (Pa) > 1)
if (Length(S)=0) or (Length (S) = 1) and (Length (Pa) > 1)
and (S [1] = DirectorySeparator) then
Delete (Pa, 1, 1)
else