mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 09:09:17 +02:00
freetype: Fix range-check error when compiled with range-check on.
(cherry picked from commit 78225565ce
)
This commit is contained in:
parent
a414fc5c19
commit
f933c75d91
@ -2014,6 +2014,8 @@ begin
|
|||||||
(nrLanguageID=0)) then
|
(nrLanguageID=0)) then
|
||||||
begin
|
begin
|
||||||
value := TT_Get_Name_String(FFace, i);
|
value := TT_Get_Name_String(FFace, i);
|
||||||
|
if value <> '' then
|
||||||
|
begin
|
||||||
for j := 1 to length(value) div 2 do
|
for j := 1 to length(value) div 2 do
|
||||||
pword(@value[j*2-1])^ := BEtoN(pword(@value[j*2-1])^);
|
pword(@value[j*2-1])^ := BEtoN(pword(@value[j*2-1])^);
|
||||||
setlength(value2, 3*(length(value) div 2) + 1); //maximum is 3-byte chars and NULL char at the end
|
setlength(value2, 3*(length(value) div 2) + 1); //maximum is 3-byte chars and NULL char at the end
|
||||||
@ -2023,6 +2025,7 @@ begin
|
|||||||
setlength(value2, len-1 );
|
setlength(value2, len-1 );
|
||||||
value := value2;
|
value := value2;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
FNamesArray[nrNameID] := value;
|
FNamesArray[nrNameID] := value;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user