mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-24 21:44:17 +00:00
prevent bencoding uninitialized entries (which causes assertion fail)
This commit is contained in:
parent
624b5f8b49
commit
c7141bcb2e
@ -137,8 +137,8 @@ int saveUserData(std::string const& filename, std::map<std::string,UserData> con
|
||||
for (i = users.begin(); i != users.end(); ++i) {
|
||||
UserData const &udata = i->second;
|
||||
|
||||
entry &userData = userDict[i->first];
|
||||
if( udata.m_following.size() ) {
|
||||
entry &userData = userDict[i->first];
|
||||
entry &followingList = userData["following"];
|
||||
BOOST_FOREACH( std::string const &n, udata.m_following) {
|
||||
followingList.list().push_back(n);
|
||||
@ -146,6 +146,7 @@ int saveUserData(std::string const& filename, std::map<std::string,UserData> con
|
||||
}
|
||||
|
||||
if( udata.m_directmsg.size() ) {
|
||||
entry &userData = userDict[i->first];
|
||||
entry &dmDict = userData["dm"];
|
||||
|
||||
std::map<std::string, std::vector<StoredDirectMsg> >::const_iterator j;
|
||||
|
Loading…
x
Reference in New Issue
Block a user