提交 64c32edf 编写于 作者: B Behdad Esfahbod

[set] Make array access more explicit

Follow up on 94e421ab
上级 e3ceb2dd
......@@ -669,7 +669,9 @@ struct hb_set_t
return nullptr;
pages[map.index].init0 ();
memmove (&page_map[i] + 1, &page_map[i], (page_map.len - 1 - i) * sizeof (page_map[0]));
memmove (page_map.arrayZ() + i + 1,
page_map.arrayZ() + i,
(page_map.len - 1 - i) * sizeof (page_map[0]));
page_map[i] = map;
}
return &pages[page_map[i].index];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册