From: handa Date: Tue, 30 Mar 2004 05:08:15 +0000 (+0000) Subject: (read_value_record): Clear value_record at X-Git-Tag: REL-0-9-1~69 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=00c44a7bc36a0f22a1ff5bd226e91431161ca931;p=m17n%2Flibotf.git (read_value_record): Clear value_record at first. (read_lookup_subtable_gpos): For Lookup Type 1, read Coverage at first. --- diff --git a/src/otfopen.c b/src/otfopen.c index f20a5cb..6776e21 100644 --- a/src/otfopen.c +++ b/src/otfopen.c @@ -1870,6 +1870,7 @@ read_value_record (OTF *otf, OTF_Stream *stream, long offset, OTF_StreamState state; int size, i; + memset (value_record, 0, sizeof (OTF_ValueRecord)); if (! bit) return 0; for (i = 0, size = 0; i < 8; i++) @@ -2169,6 +2170,8 @@ read_lookup_subtable_gpos (OTF *otf, OTF_Stream *stream, case 1: if (subtable->Format == 1) { + if (read_coverage (otf, stream, offset, &subtable->Coverage) < 0) + return -1; READ_UINT16 (stream, subtable->u.single1.ValueFormat); read_value_record (otf, stream, offset, subtable->u.single1.ValueFormat, @@ -2179,6 +2182,8 @@ read_lookup_subtable_gpos (OTF *otf, OTF_Stream *stream, OTF_GPOS_Single2 *single2 = &subtable->u.single2; int i; + if (read_coverage (otf, stream, offset, &subtable->Coverage) < 0) + return -1; READ_UINT16 (stream, single2->ValueFormat); READ_UINT16 (stream, single2->ValueCount); OTF_CALLOC (single2->Value, single2->ValueCount," (ValueRecord)");