Browse Source

* Fix split, last term of length 1 is sometimes missed

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

+ 1 - 1
rtl/objpas/sysutils/syshelp.inc

@@ -1304,7 +1304,7 @@ begin
     LastSep:=Sep+System.Length(Separators[Match]);
     LastSep:=Sep+System.Length(Separators[Match]);
     Sep:=NextSep(LastSep,Match);
     Sep:=NextSep(LastSep,Match);
     end;
     end;
-  if (LastSep<Length-1) and ((ACount=0) or (Len<ACount)) then
+  if (LastSep<Length) and ((ACount=0) or (Len<ACount)) then
     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);