mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-25 14:04:27 +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;
|
std::vector<char> buf;
|
||||||
if( users.size() ) {
|
if( userDict.type() == entry::dictionary_t ) {
|
||||||
bencode(std::back_inserter(buf), userDict);
|
bencode(std::back_inserter(buf), userDict);
|
||||||
|
return save_file(filename, buf);
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return save_file(filename, buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user