From e76771105e5535d868428b8e8bd223bde0cb2524 Mon Sep 17 00:00:00 2001 From: miklosh Date: Sun, 19 Aug 2007 12:20:35 +0000 Subject: [PATCH] Fixed a typo and an off-by-one error --- src/extension/internal/pdfinput/pdf-parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp index 121e6aa47..948f0efaa 100644 --- a/src/extension/internal/pdfinput/pdf-parser.cpp +++ b/src/extension/internal/pdfinput/pdf-parser.cpp @@ -1850,7 +1850,7 @@ void PdfParser::fillPatch(GfxPatch *patch, int nComps, int depth) { break; } } - if (i == nComps || depth == maxDepths[pdfPatchMeshShading]-1) { + if (i == nComps || depth == maxDepths[pdfPatchMeshShading-1]) { state->setFillColor(&patch->color[0][0]); state->moveTo(patch->x[0][0], patch->y[0][0]); state->curveTo(patch->x[0][1], patch->y[0][1], @@ -3034,7 +3034,7 @@ void PdfParser::popResources() { void PdfParser::setDefaultApproximationPrecision() { int i; - for (i = 0; i < pdfNumShadingTypes; ++i) { + for (i = 1; i <= pdfNumShadingTypes; ++i) { setApproximationPrecision(i, defaultShadingColorDelta, defaultShadingMaxDepth); } } -- 2.30.2