From c588a84f1934d0fedc0ba61cb8287ae917c144b7 Mon Sep 17 00:00:00 2001 From: Mamy Ratsimbazafy Date: Thu, 17 May 2018 09:43:41 +0200 Subject: [PATCH] wrong variable net only_msb_set to only_msb_unset in high(IntImpl) --- stint/private/int_highlow.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stint/private/int_highlow.nim b/stint/private/int_highlow.nim index ff32d98..f18156f 100644 --- a/stint/private/int_highlow.nim +++ b/stint/private/int_highlow.nim @@ -14,8 +14,8 @@ func high*[T](_: typedesc[IntImpl[T]]): IntImpl[T] {.inline.}= # The lowest signed int has representation # 0b0111_1111_1111_1111 .... # so we only have to unset the most significant bit. - let only_msb_set = UintImpl[T].zero.not shr 1 - result = cast[IntImpl[T]](only_msb_set) + let only_msb_unset = UintImpl[T].zero.not shr 1 + result = cast[IntImpl[T]](only_msb_unset) func low*[T](_: typedesc[IntImpl[T]]): IntImpl[T] {.inline.}=