From 46f8fdf94481fab0c347e90443e8fa1723b763e6 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Tue, 21 Jun 2016 08:45:11 +0200 Subject: Fix typo due to switching from int to size_t. Commit 4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca introduced a typo when doing the int -> size_t conversion. This caused a coverity warning which is now fixed. --- source/pdf/pdf-repair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c index 08b82a3e..6e8405cb 100644 --- a/source/pdf/pdf-repair.c +++ b/source/pdf/pdf-repair.c @@ -320,9 +320,9 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) fz_seek(ctx, doc->file, 0, 0); for (j = 0; j < n - 4; j++) { - if (memcmp(&buf->scratch[i], "%PDF", 4) == 0) + if (memcmp(&buf->scratch[j], "%PDF", 4) == 0) { - fz_seek(ctx, doc->file, i + 8, 0); /* skip "%PDF-X.Y" */ + fz_seek(ctx, doc->file, j + 8, 0); /* skip "%PDF-X.Y" */ break; } } -- cgit v1.2.3