Skip to content

Commit

Permalink
Fix UB
Browse files Browse the repository at this point in the history
Signed-off-by: Yadunund <[email protected]>
  • Loading branch information
Yadunund committed Jun 4, 2024
1 parent e686493 commit 36cbc7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/liveliness_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ std::string zid_to_str(const z_id_t & id)
std::stringstream ss;
ss << std::hex;
// By Zenoh convention a z_id_t is a little endian u128
size_t i = sizeof(id.id) - 1;
int i = static_cast<int>(sizeof(id.id) - 1);
for (; i >= 0; i--) {
ss << static_cast<int>(id.id[i]);
}
Expand Down

0 comments on commit 36cbc7f

Please sign in to comment.