Keep the object_storage key terminator inside the key buffer

find_raw_string now honours the raw_string size instead of scanning for a nul.
This commit is contained in:
xirvik
2026-09-19 04:13:12 +00:00
committed by Jari Sundell
parent 3652329e2d
commit d1a6942ea7
3 changed files with 19 additions and 12 deletions
+1 -8
View File
@@ -158,14 +158,7 @@ fixed_key_type<MaxSize>::set_data(const value_type* src_data, size_type src_size
template <size_t MaxSize> inline void
fixed_key_type<MaxSize>::set_c_str(const value_type* src_data) {
value_type* itr = m_data;
const value_type* last = m_data + max_size;
while (itr != last && *src_data != '\0')
*itr++ = *src_data++;
*itr = '\0';
m_size = std::distance(m_data, itr);
set_c_str(src_data, std::strlen(src_data));
}
template <size_t MaxSize> inline void