* Merging revisions r46414 from trunk:

------------------------------------------------------------------------
    r46414 | michael | 2020-08-13 15:15:14 +0200 (Thu, 13 Aug 2020) | 1 line
    
    * Fix range check error (bug ID 37566)
    ------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@46619 -
This commit is contained in:
michael 2020-08-23 09:45:55 +00:00
parent 99088aa0e8
commit f7b6d8d738

View File

@ -198,11 +198,14 @@ procedure TPasWriter.AddLn(const s: string);
Var
L : String;
len : Integer;
begin
Add(s);
L:=PostProcessLine(FCurrentLine);
Stream.Write(L[1],Length(L));
Len:=Length(L);
if Len>0 then
Stream.Write(L[1],Len);
Stream.Write(FLineEnding[1],Length(FLineEnding));
IsStartOfLine:=True;
FCurrentLine:='';