fixed error handling in torrent_info constructor

This commit is contained in:
Arvid Norberg
2011-01-19 10:07:51 +00:00
parent 99d2c4eea8
commit 6663f527da
10 changed files with 33 additions and 24 deletions

View File

@@ -78,10 +78,10 @@ int main(int argc, char* argv[])
ses.set_settings(sett);
std::vector<char> in;
if (load_file(".ses_state", in) == 0)
error_code ec;
if (load_file(".ses_state", in, ec) == 0)
{
lazy_entry e;
error_code ec;
if (lazy_bdecode(&in[0], &in[0] + in.size(), e, ec) == 0)
ses.load_state(e);
}