浏览代码

Fixed bug in split when final word has length 1 (bug ID 29798)

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

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

@@ -1193,7 +1193,7 @@ begin
     LastSep:=Sep+1;
     LastSep:=Sep+1;
     Sep:=NextSep(LastSep);
     Sep:=NextSep(LastSep);
     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);