From 949dd3ba6190bcf7ac667eec7057d89d7cd41e9f 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(()) }