Browse Source

* check zero length instead of comparing to empty string

Michael VAN CANNEYT 2 years ago
parent
commit
057cfc100c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/inc/fexpand.inc

+ 1 - 1
rtl/inc/fexpand.inc

@@ -201,7 +201,7 @@ begin
             S := GetEnv ('HOME');
             S := GetEnv ('HOME');
   {$ENDIF FPC_FEXPAND_GETENV_PCHAR}
   {$ENDIF FPC_FEXPAND_GETENV_PCHAR}
  {$ENDIF FPC_FEXPAND_SYSUTILS}
  {$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
                                           and (S [1] = DirectorySeparator) then
                 Delete (Pa, 1, 1)
                 Delete (Pa, 1, 1)
             else
             else