Skip to content

Commit 04892d9

Browse files
committed
typo
1 parent 33eb565 commit 04892d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shims/foreign_items.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,15 +597,17 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
597597
"_ldexp" | "ldexp" | "scalbn" => {
598598
let x = this.read_scalar(args[0])?.to_f64()?;
599599
let exp = this.read_scalar(args[1])?.to_i32()?;
600+
600601
// Saturating cast to i16. Even those are outside the valid exponent range to
601-
// `scalbn` below will to its over/underflow handling.
602+
// `scalbn` below will do its over/underflow handling.
602603
let exp = if exp > i16::max_value() as i32 {
603604
i16::max_value()
604605
} else if exp < i16::min_value() as i32 {
605606
i16::min_value()
606607
} else {
607608
exp.try_into().unwrap()
608609
};
610+
609611
let res = x.scalbn(exp);
610612
this.write_scalar(Scalar::from_f64(res), dest)?;
611613
}

0 commit comments

Comments
 (0)