Skip to content

Commit

Permalink
cast BYTE to int so hex works correctly (#180)
Browse files Browse the repository at this point in the history
cast BYTE to int so hex encoding works correctly
  • Loading branch information
lucaspimentel authored Oct 29, 2018
1 parent f137c61 commit beed279
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Datadog.Trace.ClrProfiler.Native/integration.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct PublicKey {
inline WSTRING str() const {
std::stringstream ss;
for (int i = 0; i < kPublicKeySize; i++) {
ss << std::setfill('0') << std::setw(2) << std::hex << data[i];
ss << std::setfill('0') << std::setw(2) << std::hex << static_cast<int>(data[i]);
}
return ToWSTRING(ss.str());
}
Expand Down Expand Up @@ -133,7 +133,7 @@ struct MethodSignature {
WSTRING str() const {
WSTRINGSTREAM ss;
for (auto& b : data) {
ss << std::hex << std::setfill('0'_W) << std::setw(2) << b;
ss << std::hex << std::setfill('0'_W) << std::setw(2) << static_cast<int>(b);
}
return ss.str();
}
Expand Down

0 comments on commit beed279

Please sign in to comment.