mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 00:28:06 +02:00
Merge pull request #4733 from timvandermeij/postscript-unit-tests
Completes unit tests for PostScript evaluator and fixes two bugs in the evaluator itself
This commit is contained in:
commit
b3f24ca0c7
2 changed files with 217 additions and 37 deletions
|
@ -659,14 +659,14 @@ var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
|
|||
break;
|
||||
case 'neg':
|
||||
a = stack.pop();
|
||||
stack.push(-b);
|
||||
stack.push(-a);
|
||||
break;
|
||||
case 'not':
|
||||
a = stack.pop();
|
||||
if (isBool(a) && isBool(b)) {
|
||||
stack.push(a && b);
|
||||
if (isBool(a)) {
|
||||
stack.push(!a);
|
||||
} else {
|
||||
stack.push(a & b);
|
||||
stack.push(~a);
|
||||
}
|
||||
break;
|
||||
case 'or':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue