fix safe read reading zero bytes

This commit is contained in:
Szymon Walter 2018-03-20 14:34:06 +01:00
parent 2a755f740d
commit d24fde3c3d

View file

@ -349,6 +349,9 @@ mod file {
let mut vec = Vec::with_capacity(
(range.end - range.start).index64() as usize,
);
unsafe {
vec.set_len((range.end - range.start).index64() as usize);
}
let mut refmut = self.borrow_mut();
refmut
.seek(SeekFrom::Start(index.index64()))