commit | 74e6349d8e4dde988c121e9674472908cc8c748d | [log] [tgz] |
---|---|---|
author | Jeff Sharkey <jsharkey@android.com> | Thu Apr 30 17:07:15 2015 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Apr 30 17:07:15 2015 +0000 |
tree | 563d51b0e5f2dcd1b764e707ed55a7d73ded6e1c | |
parent | 1bfb375f77c093a8e16bef4ddeab2681ca126d56 [diff] | |
parent | ef3697545bc7fadec43001fa3c8376426510b9ea [diff] |
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;