Skip to content
Snippets Groups Projects
Commit 7397bd61 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

infohash: always write end of string terminator

parent 6a264d6f
No related branches found
No related tags found
No related merge requests found
...@@ -384,6 +384,7 @@ Hash<N>::to_c_str() const ...@@ -384,6 +384,7 @@ Hash<N>::to_c_str() const
const auto& m = hex_map[data_[i]]; const auto& m = hex_map[data_[i]];
*((uint16_t*)b) = *((uint16_t*)&m); *((uint16_t*)b) = *((uint16_t*)&m);
} }
buf[N*2] = '\0';
return buf.data(); return buf.data();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment