Browse Source

* Overloaded split needs similar patch

git-svn-id: trunk@44313 -
michael 5 years ago
parent
commit
5fe164498b
1 changed files with 6 additions and 3 deletions
  1. 6 3
      rtl/objpas/sysutils/syshelp.inc

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

@@ -1311,9 +1311,12 @@ begin
     begin
     begin
     T:=SubString(LastSep);
     T:=SubString(LastSep);
 //    Writeln('Examining >',T,'< at pos,',LastSep,' till pos ',Sep);
 //    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;
     end;
   SetLength(Result,Len);
   SetLength(Result,Len);
 end;
 end;