1
0

cUUID: Fix FromHexDigit for digits >= 'a'

This commit is contained in:
peterbell10 2017-08-29 14:34:09 +01:00 committed by Lukas Pioch
parent d5c4b3af6b
commit fa5bf7d5cd

View File

@ -68,11 +68,11 @@ static Byte FromHexDigit(char a_Hex)
}
if (('a' <= a_Hex) && (a_Hex <= 'f'))
{
return static_cast<Byte>(a_Hex - 'a');
return static_cast<Byte>(10 + (a_Hex - 'a'));
}
if (('A' <= a_Hex) && (a_Hex <= 'F'))
{
return static_cast<Byte>(a_Hex - 'A');
return static_cast<Byte>(10 + (a_Hex - 'A'));
}
return 0xff;
}