Skip to content

Commit

Permalink
Fixed: Always decode packed/non-packed based on wire format only, see #…
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Jan 5, 2017
1 parent e027a3c commit 11fb1a6
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions dist/noparse/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/noparse/protobuf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/noparse/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/noparse/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/noparse/protobuf.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/protobuf.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runtime/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/runtime/protobuf.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/runtime/protobuf.min.js.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions src/decoder.js
Expand Up @@ -55,8 +55,8 @@ function decoder(mtype) {
("if(!(%s&&%s.length))", ref, ref)
("%s=[]", ref);

// Packed
if (field.packed && types.packed[type] !== undefined) gen
// Packable (always check for forward and backward compatiblity)
if (/* field.packed && */types.packed[type] !== undefined) gen
("if((t&7)===2){")
("var c2=r.uint32()+r.pos")
("while(r.pos<c2)")
Expand Down

0 comments on commit 11fb1a6

Please sign in to comment.