浏览代码

* Overloaded split needs similar patch

git-svn-id: trunk@44313 -
michael 5 年之前
父节点
当前提交
5fe164498b
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      rtl/objpas/sysutils/syshelp.inc

+ 6 - 3
rtl/objpas/sysutils/syshelp.inc

@@ -1311,9 +1311,12 @@ begin
     begin
     T:=SubString(LastSep);
 //    Writeln('Examining >',T,'< at pos,',LastSep,' till pos ',Sep);
-    MaybeGrow(Len);
-    Result[Len]:=T;
-    Inc(Len);
+    If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then
+      begin
+      MaybeGrow(Len);
+      Result[Len]:=T;
+      Inc(Len);
+      end;
     end;
   SetLength(Result,Len);
 end;