Browse Source

fix another case of uninitialized entry on bencode

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
b470360bd5
  1. 7
      src/twister_utils.cpp

7
src/twister_utils.cpp

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