mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 05:20:48 +01: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);
|
errorNum := TT_Open_Face(AName,FFace);
|
||||||
if errorNum <> TT_Err_Ok then
|
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
|
end else
|
||||||
begin
|
begin
|
||||||
familyItem := Collection.Family[AName];
|
familyItem := Collection.Family[AName];
|
||||||
|
|||||||
@ -223,11 +223,8 @@ const
|
|||||||
begin
|
begin
|
||||||
if Pointer(P) = nil then exit;
|
if Pointer(P) = nil then exit;
|
||||||
|
|
||||||
i := -1;
|
head:=PBlock_Header(P);
|
||||||
head := @(PBlock_Headers(P)^[i]);
|
dec(head);
|
||||||
(* 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 *)
|
|
||||||
|
|
||||||
if head^.magic <> Mark_Magic then
|
if head^.magic <> Mark_Magic then
|
||||||
begin
|
begin
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* *
|
* *
|
||||||
* This file is part of the Lazarus Component Library (LCL) *
|
* 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. *
|
* for details about the copyright. *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user