/* The problem is that nUnits does not include this end-marker. It's quite difficult to discriminate whether the following 0xFFFF comes from the end-marker or some next data. */
static void gxv_LookupTable_fmt2_skip_endmarkers(FT_Bytes table, FT_UShort unitSize, GXV_Validator valid)
/* The problem is that nUnits does not include this end-marker. It's quite difficult to discriminate whether the following 0xFFFF comes from the end-marker or some next data. */
static void gxv_LookupTable_fmt2_skip_endmarkers(FT_Bytes table, FT_UShort unitSize, GXV_Validator valid)
{
    FT_Bytes  p = table;
    while ( ( p + 4 ) < valid->root->limit )
    {
      if ( p[0] != 0xFF || p[1] != 0xFF ||
           p[2] != 0xFF || p[3] != 0xFF )
        break;
      p += unitSize;
    }
    valid->subtable_length = p - table;
  }