Merge "Fix signed issue with hex conversion." into mnc-dev
diff --git a/Utils.cpp b/Utils.cpp
index 158a61e..f45907a 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -381,7 +381,7 @@
 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;