aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/objects')
-rw-r--r--src/modules/objects/class_file.cpp4
-rw-r--r--src/modules/objects/class_socket.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/objects/class_file.cpp b/src/modules/objects/class_file.cpp
index 1bf2de71c..31cf10916 100644
--- a/src/modules/objects/class_file.cpp
+++ b/src/modules/objects/class_file.cpp
@@ -433,9 +433,9 @@ bool KviKvsObject_file::functionreadHexBlock(KviKvsObjectFunctionCall *c)
for (int i=0;i<rlen;i++)
{
byte=(unsigned char)buff[i];
- msb=byte & 0xf0;
- msb=msb>>4;
lsb=byte & 0x0f;
+ msb=byte>>4;
+
msb>9?msb+='7':msb+='0';
lsb>9?lsb+='7':lsb+='0';
str[index++]=msb;
diff --git a/src/modules/objects/class_socket.cpp b/src/modules/objects/class_socket.cpp
index 03ac00bb6..bd763a789 100644
--- a/src/modules/objects/class_socket.cpp
+++ b/src/modules/objects/class_socket.cpp
@@ -1219,9 +1219,8 @@ bool KviKvsObject_socket::functionReadHex(KviKvsObjectFunctionCall *c)
for (int i=0;i<uLen;i++)
{
byte=(unsigned char)m_pInBuffer[i];
- msb=byte & 0xf0;
- msb=msb>>4;
lsb=byte & 0x0f;
+ msb=byte>>4;
msb>9?msb+='7':msb+='0';
lsb>9?lsb+='7':lsb+='0';
str[index++]=msb;