Sfoglia il codice sorgente

* check zero length instead of comparing to empty string

Michael VAN CANNEYT 2 anni fa
parent
commit
71ad51c37c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      rtl/inc/fexpand.inc

+ 1 - 1
rtl/inc/fexpand.inc

@@ -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