builtins: relax condition for reusing an allocation

This commit is contained in:
Brian Carroll 2022-09-02 23:35:46 +01:00
parent b1b28650e9
commit 173343eea2
No known key found for this signature in database
GPG Key ID: 5C7B2EC4101703C0

View File

@ -254,7 +254,7 @@ pub fn unsafeReallocate(
const old_width = align_width + old_length * element_width;
const new_width = align_width + new_length * element_width;
if (old_width == new_width) {
if (old_width >= new_width) {
return source_ptr;
}