[HB] Fix a couple other sanitize() bugs

This commit is contained in:
Behdad Esfahbod 2009-08-04 23:24:35 -04:00
parent 4f3ad9115a
commit 90482b6817
2 changed files with 4 additions and 4 deletions

View File

@ -1497,7 +1497,7 @@ struct PosLookup : Lookup
inline bool sanitize (SANITIZE_ARG_DEF) { inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG (); SANITIZE_DEBUG ();
if (Lookup::sanitize (SANITIZE_ARG)) return false; if (!Lookup::sanitize (SANITIZE_ARG)) return false;
OffsetArrayOf<PosLookupSubTable> &list = (OffsetArrayOf<PosLookupSubTable> &) subTable; OffsetArrayOf<PosLookupSubTable> &list = (OffsetArrayOf<PosLookupSubTable> &) subTable;
return SANITIZE_THIS (list); return SANITIZE_THIS (list);
} }
@ -1529,7 +1529,7 @@ struct GPOS : GSUBGPOS
bool sanitize (SANITIZE_ARG_DEF) { bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG (); SANITIZE_DEBUG ();
if (GSUBGPOS::sanitize (SANITIZE_ARG)) return false; if (!GSUBGPOS::sanitize (SANITIZE_ARG)) return false;
OffsetTo<PosLookupList> &list = CAST(OffsetTo<PosLookupList>, lookupList, 0); OffsetTo<PosLookupList> &list = CAST(OffsetTo<PosLookupList>, lookupList, 0);
return SANITIZE_THIS (list); return SANITIZE_THIS (list);
} }

View File

@ -822,7 +822,7 @@ struct SubstLookup : Lookup
inline bool sanitize (SANITIZE_ARG_DEF) { inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG (); SANITIZE_DEBUG ();
if (Lookup::sanitize (SANITIZE_ARG)) return false; if (!Lookup::sanitize (SANITIZE_ARG)) return false;
OffsetArrayOf<SubstLookupSubTable> &list = (OffsetArrayOf<SubstLookupSubTable> &) subTable; OffsetArrayOf<SubstLookupSubTable> &list = (OffsetArrayOf<SubstLookupSubTable> &) subTable;
return SANITIZE_THIS (list); return SANITIZE_THIS (list);
} }
@ -855,7 +855,7 @@ struct GSUB : GSUBGPOS
bool sanitize (SANITIZE_ARG_DEF) { bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG (); SANITIZE_DEBUG ();
if (GSUBGPOS::sanitize (SANITIZE_ARG)) return false; if (!GSUBGPOS::sanitize (SANITIZE_ARG)) return false;
OffsetTo<SubstLookupList> &list = CAST(OffsetTo<SubstLookupList>, lookupList, 0); OffsetTo<SubstLookupList> &list = CAST(OffsetTo<SubstLookupList>, lookupList, 0);
return SANITIZE_THIS (list); return SANITIZE_THIS (list);
} }