Offset to MarkAttachClassDef is offset to table, not offset to offset to
authorOwen Taylor <otaylor@redhat.com>
Wed, 7 Aug 2002 17:01:52 +0000 (17:01 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 7 Aug 2002 17:01:52 +0000 (17:01 +0000)
Wed Aug  7 12:32:39 2002  Owen Taylor  <otaylor@redhat.com>

        * pango/opentype/ftxgsub.c (TT_Load_GSUB_Table):
        Offset to MarkAttachClassDef is offset to table,
        not offset to offset to table.

        * pango/opentype/ftxopen.c (Get_Device): Handle
        NULL device tables which we represent with
        d->DeltaValue == NULL.

src/ftxgsub.c
src/ftxopen.c

index 6cdf3bd..6b9d4fa 100644 (file)
         if ( lo[i].LookupFlag & IGNORE_SPECIAL_MARKS )
         {
           if ( FILE_Seek( gdef->MarkAttachClassDef_offset ) ||
-               ACCESS_Frame( 2L ) )
-            goto Fail1;
-
-          new_offset = GET_UShort();
-
-          FORGET_Frame();
-
-          if ( !new_offset )
-            return TTO_Err_Invalid_GDEF_SubTable;
-
-          new_offset += base_offset;
-
-          if ( FILE_Seek( new_offset ) ||
                ( error = Load_ClassDefinition( &gdef->MarkAttachClassDef,
                                                256, stream ) ) != TT_Err_Ok )
             goto Fail1;
index c721eec..3101d6f 100644 (file)
 
     f = d->DeltaFormat;
 
-    if ( size >= d->StartSize && size <= d->EndSize )
+    if ( d->DeltaValue && size >= d->StartSize && size <= d->EndSize )
     {
       s    = size - d->StartSize;
       byte = d->DeltaValue[s >> ( 4 - f )];