From 4637cd975b6ba687bb684cffc9a9ec54d1a2c9e3 Mon Sep 17 00:00:00 2001
From: Aleksey Feoktistov <aleksey@synestproject.com>
Date: Tue, 18 Jan 2022 10:42:22 +0500
Subject: [PATCH] [*] math fix

---
 dap-sdk/core/include/dap_math_ops.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dap-sdk/core/include/dap_math_ops.h b/dap-sdk/core/include/dap_math_ops.h
index c030d10075..5e7116ad9b 100755
--- a/dap-sdk/core/include/dap_math_ops.h
+++ b/dap-sdk/core/include/dap_math_ops.h
@@ -232,7 +232,7 @@ static inline void LEFT_SHIFT_256(uint256_t a_256_bit,uint256_t* b_256_bit,int n
        b_256_bit->hi=a_256_bit.hi;
        b_256_bit->lo=a_256_bit.lo;
     }
-    if (n<128) {
+    else if (n<128) {
         uint128_t shift_temp=uint128_0;
         LEFT_SHIFT_128(a_256_bit.lo,&shift_temp,n);
         b_256_bit->lo=shift_temp;
@@ -255,7 +255,7 @@ static inline void RIGHT_SHIFT_256(uint256_t a_256_bit,uint256_t* b_256_bit,int
        b_256_bit->hi=a_256_bit.hi;
        b_256_bit->lo=a_256_bit.lo;
     }
-    if (n<128) {
+    else if (n<128) {
         uint128_t shift_temp=uint128_0;
         RIGHT_SHIFT_128(a_256_bit.hi,&shift_temp,n);
         b_256_bit->hi=shift_temp;
-- 
GitLab