Browse Source

prevent bencoding uninitialized entries (which causes assertion fail)

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
c7141bcb2e
  1. 3
      src/twister_utils.cpp

3
src/twister_utils.cpp

@ -137,8 +137,8 @@ int saveUserData(std::string const& filename, std::map<std::string,UserData> con @@ -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 @@ -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…
Cancel
Save