1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-02 04:42:33 +00:00

fixup! wip: uzlib source data reader

This commit is contained in:
cepetr 2024-05-14 16:55:10 +02:00
parent adfa4cdced
commit 88411e7f8d

View File

@ -103,7 +103,7 @@ impl<'a> SourceReadContext<'a> {
pub unsafe fn advance(&mut self, uncomp: &ffi::uzlib_uncomp) {
unsafe {
// SAFETY: we trust uzlib to move the `source` pointer only up to `source_limit`
self.buf_head += uncomp.source.offset_from(self.buf.as_ptr()) as usize;
self.buf_head = uncomp.source.offset_from(self.buf.as_ptr()) as usize;
}
}