提交 ab16b24c 编写于 作者: M Michiharu Ariza

tweaked get_fd fix

上级 dac70f25
...@@ -572,11 +572,12 @@ struct FDSelect3_4 { ...@@ -572,11 +572,12 @@ struct FDSelect3_4 {
inline hb_codepoint_t get_fd (hb_codepoint_t glyph) const inline hb_codepoint_t get_fd (hb_codepoint_t glyph) const
{ {
for (unsigned int i = 1; i < nRanges; i++) unsigned int i;
for (i = 1; i < nRanges; i++)
if (glyph < ranges[i].first) if (glyph < ranges[i].first)
return (hb_codepoint_t)ranges[i - 1].fd; break;
return (hb_codepoint_t)ranges[nRanges - 1].fd; return (hb_codepoint_t)ranges[i - 1].fd;
} }
inline GID_TYPE &sentinel (void) { return StructAfter<GID_TYPE> (ranges[nRanges - 1]); } inline GID_TYPE &sentinel (void) { return StructAfter<GID_TYPE> (ranges[nRanges - 1]); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册