From 88563b34f3d1ea429f01d4335384b134abc6fde0 Mon Sep 17 00:00:00 2001 From: Erin Date: Fri, 3 Nov 2023 09:43:08 +0100 Subject: [PATCH] Fixed rounding mode --- hbbytecode/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbbytecode/src/lib.rs b/hbbytecode/src/lib.rs index 488ebe73..80960a01 100644 --- a/hbbytecode/src/lib.rs +++ b/hbbytecode/src/lib.rs @@ -110,7 +110,7 @@ impl TryFrom for RoundingMode { type Error = (); fn try_from(value: u8) -> Result { - (value >= 3) + (value <= 3) .then(|| unsafe { core::mem::transmute(value) }) .ok_or(()) }