* Fix bug #36806, do not add empty last sep, patch from Delfion

git-svn-id: trunk@44312 -
This commit is contained in:
michael 2020-03-19 13:47:49 +00:00
parent 5cd59fd353
commit 123fe94206

View File

@ -1225,9 +1225,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;