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 -4
View File
@@ -26,10 +26,7 @@ const size_t object_storage::key_size;
object_storage::iterator
object_storage::find_raw_string(const torrent::raw_string& key) {
fixed_key_type<64> k;
k.set_c_str(key.data());
return find(k);
return find(key_type::from_raw_string(key));
}
object_storage::iterator