Browse Source

* Fix bug #34060, using provided patch by Petr-K

git-svn-id: trunk@39527 -
michael 7 years ago
parent
commit
b4ea525215
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/fcl-pdf/src/fppdf.pp

+ 3 - 3
packages/fcl-pdf/src/fppdf.pp

@@ -4111,12 +4111,12 @@ var
   i: integer;
   i: integer;
   cid, gid: uint16;
   cid, gid: uint16;
   ba: TBytes;
   ba: TBytes;
-  lMaxCharID: integer;
+  lMaxCID: integer;
 begin
 begin
   lst := Document.Fonts[FontNum].TextMapping;
   lst := Document.Fonts[FontNum].TextMapping;
   lst.Sort;
   lst.Sort;
-  lMaxCharID := lst.GetMaxCharID;
-  SetLength(ba, (lMaxCharID * 2)+1);
+  lMaxCID := lst.GetMaxGlyphID;
+  SetLength(ba, (lMaxCID + 1)*2);
   // initialize array to 0's
   // initialize array to 0's
   for i := 0 to Length(ba)-1 do
   for i := 0 to Length(ba)-1 do
     ba[i] := 0;
     ba[i] := 0;