Browse Source

Fix error in test inside AddChar local procedures

Pierre Muller 1 month ago
parent
commit
b96bd62d6c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/scanner.pas

+ 2 - 2
compiler/scanner.pas

@@ -4902,7 +4902,7 @@ type
         procedure addchar(char: AnsiChar = #0);
         begin
           Inc(i);
-          if Length(readlongcomment)>=i then
+          if i>Length(readlongcomment) then
             SetLength(readlongcomment, Length(readlongcomment)+256);
           if char<>#0 then
             readlongcomment[i]:=char
@@ -4983,7 +4983,7 @@ type
         procedure addchar;
         begin
           Inc(i);
-          if Length(readlongquotedstring)>=i then
+          if i>Length(readlongquotedstring) then
             SetLength(readlongquotedstring, Length(readlongquotedstring)+256);
           readlongquotedstring[i]:=c;
         end;