mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-01 15:37:08 -08:00
Bridge C++ bytes with Rust &[u8]
This commit is contained in:
@@ -174,7 +174,7 @@ void byte_channel::resize(size_t new_sz, bool zero) {
|
||||
resize = true;
|
||||
}
|
||||
if (resize) {
|
||||
_data.realloc(_cap);
|
||||
_data._buf = static_cast<uint8_t *>(::realloc(_data._buf, _cap));
|
||||
if (zero)
|
||||
memset(_data.buf() + old_cap, 0, _cap - old_cap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user