rustc_serialize: fix incorrect signed LEB128 decoding
The signed LEB128 decoding function used a hardcoded constant of 64 instead of the number of bits in the type of integer being decoded, which resulted in incorrect results for some inputs. Fix this, make the decoding more consistent with the unsigned version, and increase the LEB128 encoding and decoding test coverage.
This commit is contained in:
@@ -17,6 +17,7 @@ Core encoding and decoding interfaces.
|
||||
#![feature(min_specialization)]
|
||||
#![feature(vec_spare_capacity)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(int_bits_const)]
|
||||
#![feature(maybe_uninit_slice)]
|
||||
#![feature(new_uninit)]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
|
||||
Reference in New Issue
Block a user