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