mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Fix idiv and cvi. Add test case for idiv.
This commit is contained in:
parent
6afb49c6c6
commit
9de52f375d
2 changed files with 12 additions and 3 deletions
|
@ -536,7 +536,7 @@ var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
|
|||
stack.push(Math.cos(a));
|
||||
break;
|
||||
case 'cvi':
|
||||
a |= stack.pop();
|
||||
a = stack.pop() | 0;
|
||||
stack.push(a);
|
||||
break;
|
||||
case 'cvr':
|
||||
|
@ -583,7 +583,7 @@ var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
|
|||
case 'idiv':
|
||||
b = stack.pop();
|
||||
a = stack.pop();
|
||||
stack.push(Math.floor(a / b));
|
||||
stack.push((a / b) | 0);
|
||||
break;
|
||||
case 'index':
|
||||
a = stack.pop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue