Fix signed issue with hex conversion.

Change-Id: Ia11c689c373f41b2a63bc84151eb16f7c7b9d155
This commit is contained in:
Jeff Sharkey 2015-04-29 15:57:48 -07:00
parent ba6747f119
commit ef3697545b

View file

@ -381,7 +381,7 @@ static const char* kLookup = "0123456789abcdef";
status_t StrToHex(const std::string& str, std::string& hex) {
hex.clear();
for (size_t i = 0; i < str.size(); i++) {
hex.push_back(kLookup[str[i] >> 4]);
hex.push_back(kLookup[(str[i] & 0xF0) >> 4]);
hex.push_back(kLookup[str[i] & 0x0F]);
}
return OK;