We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.sub()
BIT_initCStream
1 parent 7ee331e commit cd6c071Copy full SHA for cd6c071
1 file changed
lib/common/bitstream.rs
@@ -28,10 +28,11 @@ pub(crate) unsafe fn BIT_initCStream(
28
bitC.bitPos = 0;
29
bitC.startPtr = startPtr as *mut core::ffi::c_char;
30
bitC.ptr = bitC.startPtr;
31
- bitC.endPtr = (bitC.startPtr)
+ bitC.endPtr = bitC
32
+ .startPtr
33
.add(dstCapacity)
- .offset(-(::core::mem::size_of::<BitContainerType>() as core::ffi::c_ulong as isize));
34
- if dstCapacity <= ::core::mem::size_of::<BitContainerType>() {
+ .sub(size_of::<BitContainerType>());
35
+ if dstCapacity <= size_of::<BitContainerType>() {
36
return Error::dstSize_tooSmall.to_error_code();
37
}
38
0
0 commit comments