Skip to content

Commit

Permalink
Use int8_t instead of char for sign extension because char can be uns…
Browse files Browse the repository at this point in the history
…igned. (#4514)

Signed-off-by: Trevor Schroeder <[email protected]>
  • Loading branch information
tschroed authored and mattklein123 committed Sep 24, 2018
1 parent 7d0a09c commit f1d31da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/envoy/buffer/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class Instance {
auto result = static_cast<T>(0);
constexpr const auto all_bits_enabled = static_cast<T>(~static_cast<T>(0));

char* bytes = reinterpret_cast<char*>(std::addressof(result));
int8_t* bytes = reinterpret_cast<int8_t*>(std::addressof(result));
copyOut(start, Size, &bytes[displacement]);

constexpr const auto most_significant_read_byte =
Expand Down

0 comments on commit f1d31da

Please sign in to comment.