mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
Fixes 6113.
This commit is contained in:
parent
c8fd9c8c06
commit
60fbb5ef69
3 changed files with 14 additions and 1 deletions
|
@ -364,7 +364,10 @@ var PDFFunction = (function PDFFunctionClosure() {
|
|||
var rmin = encode[2 * i];
|
||||
var rmax = encode[2 * i + 1];
|
||||
|
||||
tmpBuf[0] = rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin);
|
||||
// Prevent the value from becoming NaN as a result
|
||||
// of division by zero (fixes issue6113.pdf).
|
||||
tmpBuf[0] = dmin === dmax ? rmin :
|
||||
rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin);
|
||||
|
||||
// call the appropriate function
|
||||
fns[i](tmpBuf, 0, dest, destOffset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue