refactor(asset): Use the proper STL function to 0-fill vector (#138)
This commit is contained in:
parent
799b5d99ae
commit
401ad99dc3
@ -18,8 +18,7 @@ auto asset::serialize() -> std::vector<u8>
|
|||||||
throw std::runtime_error("script file serialize error");
|
throw std::runtime_error("script file serialize error");
|
||||||
}
|
}
|
||||||
|
|
||||||
data.resize(name.size() + (compressedLen ? compressedLen : len) + bytecodeLen + 13);
|
data.resize(name.size() + (compressedLen ? compressedLen : len) + bytecodeLen + 13, 0);
|
||||||
std::memset(data.data(), 0, data.size());
|
|
||||||
|
|
||||||
auto pos = usize{ 0 };
|
auto pos = usize{ 0 };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user