From 64c32edfe18f5ef3b348e5c84077ee1f6faf4f48 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 25 Oct 2018 16:35:36 -0700 Subject: [PATCH] [set] Make array access more explicit Follow up on 94e421abbfc7ede9aaf3c8d86bb0ff9992ea3123 --- src/hb-set.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-set.hh b/src/hb-set.hh index 5fdad2b71..7ba4c04da 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -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];