mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix bug #61294
This commit is contained in:
@ -160,19 +160,17 @@ const bool BinReaderProcessor::readChild(BaseObject& object, const bool is_manda
|
|||||||
// We don't update ret_val here because we are reading to the copy of the object.
|
// We don't update ret_val here because we are reading to the copy of the object.
|
||||||
// And the real object will remain uninitialized
|
// And the real object will remain uninitialized
|
||||||
wanted_objects.push_back(object.clone()); // store the copy of the object that was not found (this line is here to take another chance to be read after some trash processed)
|
wanted_objects.push_back(object.clone()); // store the copy of the object that was not found (this line is here to take another chance to be read after some trash processed)
|
||||||
for(BaseObjectPtrList::iterator it = wanted_objects.begin()/*, itEnd = */;
|
for (BaseObjectPtrList::iterator it = wanted_objects.begin(); it != wanted_objects.end();)
|
||||||
it != wanted_objects.end();)
|
|
||||||
{
|
{
|
||||||
const BaseObjectPtr w_object = *it;
|
const BaseObjectPtr w_object = *it;
|
||||||
if(w_object->read(reader_, parent_, false))
|
BaseObjectPtrList::iterator it_del = wanted_objects.end();
|
||||||
|
if (w_object->read(reader_, parent_, false))
|
||||||
{
|
{
|
||||||
// Remove successfully read object from the wanted objects list
|
it_del = it;
|
||||||
wanted_objects.erase(++it);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
++it;
|
|
||||||
}
|
}
|
||||||
|
++it;
|
||||||
|
if (it_del != wanted_objects.end())
|
||||||
|
wanted_objects.erase(it_del);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user