fixed debug iterator assert

This commit is contained in:
Arvid Norberg 2011-11-24 23:01:35 +00:00
parent cab1f3d207
commit 38889d4bda
1 changed files with 2 additions and 1 deletions

View File

@ -5367,7 +5367,8 @@ ctx->set_verify_callback(verify_function, ec);
// for some weird reason valgrind claims these are uninitialized
// unless it's zeroed out here (block_info has a construct that's
// supposed to initialize it)
memset(&blk[0], 0, sizeof(blk[0]) * blk.size());
if (!blk.empty())
memset(&blk[0], 0, sizeof(blk[0]) * blk.size());
int counter = 0;
for (std::vector<piece_picker::downloading_piece>::const_iterator i