From 2838b466fe6e631345d0edabee5a4e27a19b75f4 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Sat, 28 Oct 2023 13:22:38 -0700 Subject: [PATCH] initial commits --- bytes/encodebyte.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bytes/encodebyte.go b/bytes/encodebyte.go index 0747c0d..e54039d 100644 --- a/bytes/encodebyte.go +++ b/bytes/encodebyte.go @@ -7,8 +7,8 @@ import ( // EncodeByte encodes the value of a byte into hexadecimal. func EncodeByte(value byte, symbolFunc func(byte)byte) (mostSignificant byte, leastSignificant byte) { - mostSignificant = symbolFunc( (0xf0 & value) >> 4 ) - leastSignificant = symbolFunc( (0x0f & value) ) + mostSignificant = symbolFunc( (0x0f & (value >> 4)) ) + leastSignificant = symbolFunc( (0x0f & (value )) ) return }