From 6538841ecbde2ff267dde27c065fb23b0f7470e6 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 3 Nov 2010 20:40:24 +0000 Subject: Do not add sibling children as parents Fixes c2ff94b1600b8a5841a5e4627f014560ac460f1a --- poppler/Function.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/poppler/Function.cc b/poppler/Function.cc index a8fcd850..4ab32cb8 100644 --- a/poppler/Function.cc +++ b/poppler/Function.cc @@ -607,18 +607,19 @@ StitchingFunction::StitchingFunction(Object *funcObj, Dict *dict, std::set funcs[i] = NULL; } for (i = 0; i < k; ++i) { + std::set usedParentsAux = *usedParents; obj1.arrayGetNF(i, &obj2); if (obj2.isRef()) { const Ref ref = obj2.getRef(); - if (usedParents->find(ref.num) == usedParents->end()) { - usedParents->insert(ref.num); + if (usedParentsAux.find(ref.num) == usedParentsAux.end()) { + usedParentsAux.insert(ref.num); obj2.free(); obj1.arrayGet(i, &obj2); } else { goto err2; } } - if (!(funcs[i] = Function::parse(&obj2, usedParents))) { + if (!(funcs[i] = Function::parse(&obj2, &usedParentsAux))) { goto err2; } if (i > 0 && (funcs[i]->getInputSize() != 1 || -- cgit v1.2.3