mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-03 02:10:53 +01:00
Merge hotfix: x64 AssemblyBuilder: Don't copy data of size zero
This commit is contained in:
parent
01f36ef4e8
commit
b2f4f70274
1 changed files with 3 additions and 1 deletions
|
@ -385,7 +385,9 @@ void AssemblyBuilderX64::finalize()
|
||||||
size_t dataSize = data.size() - dataPos;
|
size_t dataSize = data.size() - dataPos;
|
||||||
|
|
||||||
// Shrink data
|
// Shrink data
|
||||||
memmove(&data[0], &data[dataPos], dataSize);
|
if (dataSize > 0)
|
||||||
|
memmove(&data[0], &data[dataPos], dataSize);
|
||||||
|
|
||||||
data.resize(dataSize);
|
data.resize(dataSize);
|
||||||
|
|
||||||
finalized = true;
|
finalized = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue