mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #15755 from calixteman/rounding_printf
[JS] Fix a rounding issue in printf (bug 1802888)
This commit is contained in:
commit
33f9d1aab2
2 changed files with 16 additions and 3 deletions
|
@ -155,10 +155,11 @@ class Util extends PDFObject {
|
|||
}
|
||||
if (decPart.length > 2) {
|
||||
decPart = `${decimalSep}${decPart.substring(2)}`;
|
||||
} else if (cFlags & HASH) {
|
||||
decPart = ".";
|
||||
} else {
|
||||
decPart = "";
|
||||
if (decPart === "1") {
|
||||
intPart += Math.sign(arg);
|
||||
}
|
||||
decPart = cFlags & HASH ? "." : "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue