mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-10 23:07:52 +00:00
fix another case of uninitialized entry on bencode
This commit is contained in:
parent
5b71538165
commit
b470360bd5
@ -164,11 +164,12 @@ int saveUserData(std::string const& filename, std::map<std::string,UserData> con
|
||||
}
|
||||
|
||||
std::vector<char> buf;
|
||||
if( users.size() ) {
|
||||
if( userDict.type() == entry::dictionary_t ) {
|
||||
bencode(std::back_inserter(buf), userDict);
|
||||
return save_file(filename, buf);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return save_file(filename, buf);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user