mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 18:29:12 +02:00
Codetools: Prevent another range check error. Issue #40922, patch by WooBean007.
This commit is contained in:
parent
937d3a121b
commit
65f647e25b
@ -1825,7 +1825,7 @@ begin
|
||||
dec(IdentStart);
|
||||
if (IdentStart>1) and (Source[IdentStart-1]='&') then
|
||||
dec(IdentStart);
|
||||
if (IdentEnd<=length(Source)) and (Source[IdentEnd]='&') then
|
||||
if (IdentEnd<=length(Source)) and (Source[IdentEnd]='&') then
|
||||
inc(IdentEnd);
|
||||
while (IdentEnd<=length(Source))
|
||||
and (IsIdentChar[Source[IdentEnd]]) do
|
||||
@ -1836,7 +1836,7 @@ begin
|
||||
and (not IsIdentStartChar[Source[IdentStart]]) do
|
||||
inc(IdentStart);
|
||||
|
||||
if (IdentStart>0) and (Source[IdentStart]='&') then begin
|
||||
if (IdentStart>0) and (IdentStart<=length(Source)) and (Source[IdentStart]='&') then begin
|
||||
if (IdentStart>length(Source)) or not IsIdentStartChar[Source[IdentStart+1]] then
|
||||
IdentEnd:=IdentStart;
|
||||
end else
|
||||
|
Loading…
Reference in New Issue
Block a user