mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 18:40:29 +02:00
lazfreetype: fixed range check error, improved error message
git-svn-id: trunk@38141 -
This commit is contained in:
parent
141b15e2b6
commit
36feb4ee3e
@ -591,7 +591,7 @@ begin
|
||||
|
||||
errorNum := TT_Open_Face(AName,FFace);
|
||||
if errorNum <> TT_Err_Ok then
|
||||
raise exception.Create('Cannot open font (TT_Error ' + intToStr(errorNum)+')');
|
||||
raise exception.Create('Cannot open font (TT_Error ' + intToStr(errorNum)+') "'+AName+'"');
|
||||
end else
|
||||
begin
|
||||
familyItem := Collection.Family[AName];
|
||||
|
@ -223,11 +223,8 @@ const
|
||||
begin
|
||||
if Pointer(P) = nil then exit;
|
||||
|
||||
i := -1;
|
||||
head := @(PBlock_Headers(P)^[i]);
|
||||
(* A hack to get the header in PB, as the line *)
|
||||
(* @(PBlock_Headers(P)^[-1] would give a 'constant error' *)
|
||||
(* at compile time. I'm unsure this works correctly in BP *)
|
||||
head:=PBlock_Header(P);
|
||||
dec(head);
|
||||
|
||||
if head^.magic <> Mark_Magic then
|
||||
begin
|
||||
|
@ -3,7 +3,7 @@
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
|
Loading…
Reference in New Issue
Block a user