Merge hotfix: x64 AssemblyBuilder: Don't copy data of size zero

This commit is contained in:
Rob Blanckaert 2022-05-26 14:46:41 -07:00
parent 01f36ef4e8
commit b2f4f70274

View File

@ -385,7 +385,9 @@ void AssemblyBuilderX64::finalize()
size_t dataSize = data.size() - dataPos;
// Shrink data
memmove(&data[0], &data[dataPos], dataSize);
if (dataSize > 0)
memmove(&data[0], &data[dataPos], dataSize);
data.resize(dataSize);
finalized = true;