Skip to content

Commit 0bdb088

Browse files
authored
Update OpenWebNetTCP.cpp
1 parent 39a34fa commit 0bdb088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hardware/OpenWebNetTCP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ const std::string COpenWebNetTCP::byteToHexStrConvert(uint8_t *digest, size_t di
357357
char arrayOfChar1[] = "0123456789abcdef";
358358
for (idxb = 0, idxh = 0; idxb < digestLen; idxb++, idxh += 2)
359359
{
360-
byte bval = digest[idxb] & 0xFF;
361-
pArray[idxh] = arrayOfChar1[bval >> 4];
360+
uint8_t bval = digest[idxb] & 0xFF;
361+
pArray[idxh] = arrayOfChar1[(bval >> 4) & 0xf];
362362
pArray[idxh + 1] = arrayOfChar1[bval & 0xF];
363363
}
364364
pArray[idxh] = 0;

0 commit comments

Comments
 (0)