lazfreetype: fixed range check error, improved error message

git-svn-id: trunk@38141 -
This commit is contained in:
mattias 2012-08-04 10:11:16 +00:00
parent 141b15e2b6
commit 36feb4ee3e
3 changed files with 4 additions and 7 deletions

View File

@ -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];

View File

@ -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

View File

@ -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, *