mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05: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