Read the unpacked object in the raw string case

A list holding one raw string reached this case and threw on `src`.
This commit is contained in:
noctuum
2026-09-28 17:02:42 +05:00
committed by Jari Sundell
parent 5421a35349
commit 8bcc4c6e92
+1 -1
View File
@@ -393,7 +393,7 @@ convert_to_value_nothrow(const torrent::Object& src, int64_t* value, int base, i
== unpacked.as_string().c_str() + unpacked.as_string().size();
case torrent::Object::TYPE_RAW_STRING: {
const torrent::raw_string& str = src.as_raw_string();
const torrent::raw_string& str = unpacked.as_raw_string();
auto buffer = std::make_unique<char[]>(str.size() + 1);
std::memcpy(buffer.get(), str.data(), str.size());