mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Completes unit tests for PostScript evaluator and fixes two bugs in the evaluator itself
This commit is contained in:
parent
f8b3444b18
commit
4caf5b694e
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