mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-06 14:39:39 +01:00
LazReport: Check the length of a string before accessing its members. Issue #28896, patch from Tony Whyman.
git-svn-id: trunk@50162 -
This commit is contained in:
parent
105b3e0652
commit
dd99e47f84
@ -128,7 +128,7 @@ end;
|
|||||||
|
|
||||||
procedure RemoveQuotes(var s: String);
|
procedure RemoveQuotes(var s: String);
|
||||||
begin
|
begin
|
||||||
if (s[1] = '"') and (s[Length(s)] = '"') then
|
if (Length(s) > 1) and (s[1] = '"') and (s[Length(s)] = '"') then
|
||||||
s := Copy(s, 2, Length(s) - 2);
|
s := Copy(s, 2, Length(s) - 2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user