提交 ad273881 编写于 作者: V Volker H. Simonis 提交者: Behdad Esfahbod

Minor fixes to pacify Coverity code scan

Fixes https://github.com/behdad/harfbuzz/pull/377
上级 1e1825bf
...@@ -355,7 +355,11 @@ struct hb_ot_face_cmap_accelerator_t ...@@ -355,7 +355,11 @@ struct hb_ot_face_cmap_accelerator_t
if (!subtable) subtable = cmap->find_subtable (0, 2); if (!subtable) subtable = cmap->find_subtable (0, 2);
if (!subtable) subtable = cmap->find_subtable (0, 1); if (!subtable) subtable = cmap->find_subtable (0, 1);
if (!subtable) subtable = cmap->find_subtable (0, 0); if (!subtable) subtable = cmap->find_subtable (0, 0);
if (!subtable)(subtable = cmap->find_subtable (3, 0)) && (symbol = true); if (!subtable)
{
subtable = cmap->find_subtable (3, 0);
if (subtable) symbol = true;
}
/* Meh. */ /* Meh. */
if (!subtable) subtable = &OT::Null(OT::CmapSubtable); if (!subtable) subtable = &OT::Null(OT::CmapSubtable);
......
...@@ -690,7 +690,7 @@ struct PairPosFormat1 ...@@ -690,7 +690,7 @@ struct PairPosFormat1
(this+coverage).add_coverage (c->input); (this+coverage).add_coverage (c->input);
unsigned int count = pairSet.len; unsigned int count = pairSet.len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
(this+pairSet[i]).collect_glyphs (c, &valueFormat1); (this+pairSet[i]).collect_glyphs (c, valueFormat);
} }
inline const Coverage &get_coverage (void) const inline const Coverage &get_coverage (void) const
...@@ -709,7 +709,7 @@ struct PairPosFormat1 ...@@ -709,7 +709,7 @@ struct PairPosFormat1
skippy_iter.reset (buffer->idx, 1); skippy_iter.reset (buffer->idx, 1);
if (!skippy_iter.next ()) return_trace (false); if (!skippy_iter.next ()) return_trace (false);
return_trace ((this+pairSet[index]).apply (c, &valueFormat1, skippy_iter.idx)); return_trace ((this+pairSet[index]).apply (c, valueFormat, skippy_iter.idx));
} }
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
...@@ -718,11 +718,11 @@ struct PairPosFormat1 ...@@ -718,11 +718,11 @@ struct PairPosFormat1
if (!c->check_struct (this)) return_trace (false); if (!c->check_struct (this)) return_trace (false);
unsigned int len1 = valueFormat1.get_len (); unsigned int len1 = valueFormat[0].get_len ();
unsigned int len2 = valueFormat2.get_len (); unsigned int len2 = valueFormat[1].get_len ();
PairSet::sanitize_closure_t closure = { PairSet::sanitize_closure_t closure = {
this, this,
&valueFormat1, valueFormat,
len1, len1,
1 + len1 + len2 1 + len1 + len2
}; };
...@@ -735,10 +735,10 @@ struct PairPosFormat1 ...@@ -735,10 +735,10 @@ struct PairPosFormat1
OffsetTo<Coverage> OffsetTo<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of subtable */ * beginning of subtable */
ValueFormat valueFormat1; /* Defines the types of data in ValueFormat valueFormat[2]; /* [0] Defines the types of data in
* ValueRecord1--for the first glyph * ValueRecord1--for the first glyph
* in the pair--may be zero (0) */ * in the pair--may be zero (0) */
ValueFormat valueFormat2; /* Defines the types of data in /* [1] Defines the types of data in
* ValueRecord2--for the second glyph * ValueRecord2--for the second glyph
* in the pair--may be zero (0) */ * in the pair--may be zero (0) */
OffsetArrayOf<PairSet> OffsetArrayOf<PairSet>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册