diff --git a/rosidl_typesupport_c/src/type_support_dispatch.hpp b/rosidl_typesupport_c/src/type_support_dispatch.hpp index 4c7ae3e6..c689f882 100644 --- a/rosidl_typesupport_c/src/type_support_dispatch.hpp +++ b/rosidl_typesupport_c/src/type_support_dispatch.hpp @@ -43,7 +43,10 @@ get_typesupport_handle_function( return handle; } - if (handle->typesupport_identifier == rosidl_typesupport_c__typesupport_identifier) { + if (strcmp( + handle->typesupport_identifier, + rosidl_typesupport_c__typesupport_identifier) == 0) + { const type_support_map_t * map = \ static_cast(handle->data); for (size_t i = 0; i < map->size; ++i) { diff --git a/rosidl_typesupport_cpp/src/type_support_dispatch.hpp b/rosidl_typesupport_cpp/src/type_support_dispatch.hpp index c662ffc2..39c34014 100644 --- a/rosidl_typesupport_cpp/src/type_support_dispatch.hpp +++ b/rosidl_typesupport_cpp/src/type_support_dispatch.hpp @@ -41,7 +41,10 @@ get_typesupport_handle_function( return handle; } - if (handle->typesupport_identifier == rosidl_typesupport_cpp::typesupport_identifier) { + if (strcmp( + handle->typesupport_identifier, + rosidl_typesupport_cpp::typesupport_identifier) == 0) + { const type_support_map_t * map = \ static_cast(handle->data); for (size_t i = 0; i < map->size; ++i) {