improve error recovery in lazy bdecoder

This commit is contained in:
Arvid Norberg 2014-04-23 00:25:55 +00:00
parent f037704539
commit 7d1de6215a
1 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,10 @@ namespace libtorrent
ec = make_error_code(code); \
while (!stack.empty()) { \
top = stack.back(); \
if (top->type() == lazy_entry::dict_t || top->type() == lazy_entry::list_t) top->pop(); \
if (top->type() == lazy_entry::dict_t || top->type() == lazy_entry::list_t) { \
top->pop(); \
break; \
} \
stack.pop_back(); \
} \
if (error_pos) *error_pos = start - orig_start; \