From: miklosh Date: Sun, 19 Aug 2007 12:20:35 +0000 (+0000) Subject: Fixed a typo and an off-by-one error X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e76771105e5535d868428b8e8bd223bde0cb2524;p=inkscape.git Fixed a typo and an off-by-one error --- 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); } }