fix safe read reading zero bytes
This commit is contained in:
parent
2a755f740d
commit
d24fde3c3d
|
@ -349,6 +349,9 @@ mod file {
|
||||||
let mut vec = Vec::with_capacity(
|
let mut vec = Vec::with_capacity(
|
||||||
(range.end - range.start).index64() as usize,
|
(range.end - range.start).index64() as usize,
|
||||||
);
|
);
|
||||||
|
unsafe {
|
||||||
|
vec.set_len((range.end - range.start).index64() as usize);
|
||||||
|
}
|
||||||
let mut refmut = self.borrow_mut();
|
let mut refmut = self.borrow_mut();
|
||||||
refmut
|
refmut
|
||||||
.seek(SeekFrom::Start(index.index64()))
|
.seek(SeekFrom::Start(index.index64()))
|
||||||
|
|
Reference in a new issue