From: handa Date: Thu, 5 Aug 2004 05:20:13 +0000 (+0000) Subject: (read_ligature_attach): Fix for the case that an X-Git-Tag: REL-0-9-1~24 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d457fd9766282fb3bb343343d609cbc967540961;p=m17n%2Flibotf.git (read_ligature_attach): Fix for the case that an offset is NULL. --- diff --git a/src/otfopen.c b/src/otfopen.c index 0fce174..60adefe 100644 --- a/src/otfopen.c +++ b/src/otfopen.c @@ -2213,9 +2213,16 @@ read_ligature_attach (OTF *otf, OTF_Stream *stream, long offset, } for (i = 0; i < attach->ComponentCount; i++) for (j = 0; j < ClassCount; j++) - if (read_anchor (otf, stream, offset + attach->offset, - &attach->ComponentRecord[i].LigatureAnchor[j]) < 0) - return -1; + { + if (attach->ComponentRecord[i].LigatureAnchor[j].offset) + { + if (read_anchor (otf, stream, offset + attach->offset, + &attach->ComponentRecord[i].LigatureAnchor[j]) < 0) + return -1; + } + else + attach->ComponentRecord[i].LigatureAnchor[j].AnchorFormat = 0; + } return 0; }