Merge pull request #530 from kkujala/master

Remove else after return in parserGetObj.
This commit is contained in:
Andreas Gal 2011-09-26 10:16:11 -07:00
commit b4b18c04c7

15
pdf.js
View File

@ -2746,7 +2746,8 @@ var Parser = (function parserParser() {
if (IsCmd(this.buf1, 'BI')) { // inline image if (IsCmd(this.buf1, 'BI')) { // inline image
this.shift(); this.shift();
return this.makeInlineImage(cipherTransform); return this.makeInlineImage(cipherTransform);
} else if (IsCmd(this.buf1, '[')) { // array }
if (IsCmd(this.buf1, '[')) { // array
this.shift(); this.shift();
var array = []; var array = [];
while (!IsCmd(this.buf1, ']') && !IsEOF(this.buf1)) while (!IsCmd(this.buf1, ']') && !IsEOF(this.buf1))
@ -2755,7 +2756,8 @@ var Parser = (function parserParser() {
error('End of file inside array'); error('End of file inside array');
this.shift(); this.shift();
return array; return array;
} else if (IsCmd(this.buf1, '<<')) { // dictionary or stream }
if (IsCmd(this.buf1, '<<')) { // dictionary or stream
this.shift(); this.shift();
var dict = new Dict(); var dict = new Dict();
while (!IsCmd(this.buf1, '>>') && !IsEOF(this.buf1)) { while (!IsCmd(this.buf1, '>>') && !IsEOF(this.buf1)) {
@ -2777,11 +2779,11 @@ var Parser = (function parserParser() {
if (IsCmd(this.buf2, 'stream')) { if (IsCmd(this.buf2, 'stream')) {
return this.allowStreams ? return this.allowStreams ?
this.makeStream(dict, cipherTransform) : dict; this.makeStream(dict, cipherTransform) : dict;
} else {
this.shift();
} }
this.shift();
return dict; return dict;
} else if (IsInt(this.buf1)) { // indirect reference or integer }
if (IsInt(this.buf1)) { // indirect reference or integer
var num = this.buf1; var num = this.buf1;
this.shift(); this.shift();
if (IsInt(this.buf1) && IsCmd(this.buf2, 'R')) { if (IsInt(this.buf1) && IsCmd(this.buf2, 'R')) {
@ -2791,7 +2793,8 @@ var Parser = (function parserParser() {
return ref; return ref;
} }
return num; return num;
} else if (IsString(this.buf1)) { // string }
if (IsString(this.buf1)) { // string
var str = this.buf1; var str = this.buf1;
this.shift(); this.shift();
if (cipherTransform) if (cipherTransform)