Skip to content

Commit

Permalink
hot fix for bug in conversion from endpoint to string
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Aug 28, 2024
1 parent 3d682d7 commit 8c358e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif ()

set (THALLIUM_VERSION_MAJOR 0)
set (THALLIUM_VERSION_MINOR 14)
set (THALLIUM_VERSION_PATCH 2)
set (THALLIUM_VERSION_PATCH 3)
set (thallium-vers "${THALLIUM_VERSION_MAJOR}.${THALLIUM_VERSION_MINOR}")
set (THALLIUM_VERSION "${thallium-vers}.${THALLIUM_VERSION_PATCH}")
math (EXPR THALLIUM_VERSION_NUM "${THALLIUM_VERSION_MAJOR}*1000000 + ${THALLIUM_VERSION_MINOR}*1000 + ${THALLIUM_VERSION_PATCH}")
Expand Down
8 changes: 4 additions & 4 deletions include/thallium/endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@ class endpoint {
* @return A string representation of the endpoint's address.
*/
operator std::string() const {
std::string result;
std::vector<char> result;
if(m_addr == HG_ADDR_NULL)
return result;
hg_size_t size;
return std::string{};
hg_size_t size;
auto ret = margo_addr_to_string(m_mid, nullptr, &size, m_addr);
MARGO_ASSERT(ret, margo_addr_to_string);
result.resize(size);
ret = margo_addr_to_string(m_mid, const_cast<char*>(result.data()), &size, m_addr);
MARGO_ASSERT(ret, margo_addr_to_string);
return result;
return std::string{result.data()};
}

/**
Expand Down

0 comments on commit 8c358e0

Please sign in to comment.