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.
1 parent 74b4eea commit fe2a867Copy full SHA for fe2a867
compiler/rustc_middle/src/mir/interpret/mod.rs
@@ -570,7 +570,7 @@ pub fn write_target_uint(
570
571
#[inline]
572
pub fn read_target_uint(endianness: Endian, mut source: &[u8]) -> Result<u128, io::Error> {
573
- let mut buf = [0; 16];
+ let mut buf = [0u8; std::mem::size_of::<u128>()];
574
source.read(&mut buf)?;
575
match endianness {
576
Endian::Little => Ok(u128::from_le_bytes(buf)),
0 commit comments