summaryrefslogtreecommitdiff
path: root/apps/pdfclean.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2010-07-26 12:22:50 +0000
committerSebastian Rasmussen <sebras@hotmail.com>2010-07-26 12:22:50 +0000
commit79cadb339e01176133279790a0df08a06f757235 (patch)
tree23acdcc95c4889780a02dde69b6a5b6fc478ef60 /apps/pdfclean.c
parenta0e390a1234b1cc58f8e1fda7c7fb84921f46a59 (diff)
downloadmupdf-79cadb339e01176133279790a0df08a06f757235.tar.xz
Only drop objects that have been renumbered in pdfclean.
Diffstat (limited to 'apps/pdfclean.c')
-rw-r--r--apps/pdfclean.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c
index ab2ee4c8..27c8693c 100644
--- a/apps/pdfclean.c
+++ b/apps/pdfclean.c
@@ -171,9 +171,12 @@ static void renumberxref(void)
{
if (newnumlist[num] >= 0)
{
- xref->table[newnumlist[num]] = oldxreflist[num];
uselist[newnumlist[num]] = 1;
- xref->table[num].obj = nil;
+ if (newnumlist[num] != num)
+ {
+ xref->table[newnumlist[num]] = oldxreflist[num];
+ xref->table[num].obj = nil;
+ }
}
}