浏览代码

* check zero length instead of comparing to empty string

Michael VAN CANNEYT 2 年之前
父节点
当前提交
057cfc100c
共有 1 个文件被更改,包括 1 次插入1 次删除
  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