[vector] Always 0-fill new items

This commit is contained in:
Behdad Esfahbod 2018-06-11 22:11:45 -04:00
parent a7e1b4a3b2
commit c4d0d11c55
1 changed files with 3 additions and 0 deletions

View File

@ -716,6 +716,9 @@ struct hb_vector_t
if (!alloc (size))
return false;
if (size > len)
memset (arrayZ + len, 0, (size - len) * sizeof (*arrayZ));
len = size;
return true;
}