提交 8465a05a 编写于 作者: B Behdad Esfahbod

Fix hb_buffer_guess_segment_properties() for empty buffer

Was causing assertion failure in shape_plan().
上级 e75943de
......@@ -493,8 +493,8 @@ hb_buffer_t::merge_out_clusters (unsigned int start,
void
hb_buffer_t::guess_segment_properties (void)
{
if (unlikely (!len)) return;
assert (content_type == HB_BUFFER_CONTENT_TYPE_UNICODE);
assert (content_type == HB_BUFFER_CONTENT_TYPE_UNICODE ||
(!len && content_type == HB_BUFFER_CONTENT_TYPE_INVALID));
/* If script is set to INVALID, guess from buffer contents */
if (props.script == HB_SCRIPT_INVALID) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册