mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Ignore double negative in Lexer_getNumber
(issue 6218)
Basic mathematics would suggest that a double negative should always become positive, but it appears that Adobe Reader simply ignores that case. Hence I think that it makes sense for us to do the same. Fixes 6218.
This commit is contained in:
parent
cf6d40f348
commit
c718d1ab10
2 changed files with 12 additions and 0 deletions
|
@ -671,6 +671,11 @@ var Lexer = (function LexerClosure() {
|
|||
if (ch === 0x2D) { // '-'
|
||||
sign = -1;
|
||||
ch = this.nextChar();
|
||||
|
||||
if (ch === 0x2D) { // '-'
|
||||
// Ignore double negative (this is consistent with Adobe Reader).
|
||||
ch = this.nextChar();
|
||||
}
|
||||
} else if (ch === 0x2B) { // '+'
|
||||
ch = this.nextChar();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue