Fix constructInterpolatedFromIR + fix indexing i that should be j

This commit is contained in:
Julian Viereck 2011-09-08 16:22:06 -07:00
parent 755399a755
commit 2b7ff49d8d

7
pdf.js
View File

@ -6640,19 +6640,20 @@ var PDFFunction = (function() {
for (var i = 0; i < length; ++i)
diff.push(c1[i] - c0[i]);
return [ CONSTRUCT_INTERPOLATED, c0, diff ];
return [ CONSTRUCT_INTERPOLATED, c0, diff, n ];
},
constructInterpolatedFromIR: function(IR) {
var c0 = IR[1];
var c0 = IR[1];
var diff = IR[2];
var n = IR[3];
return function(args) {
var x = args[0];
var out = [];
for (var j = 0; j < length; ++j)
out.push(c0[j] + (x^n * diff[i]));
out.push(c0[j] + (x^n * diff[j]));
return out;