diff --git a/lib/binary_parser.js b/lib/binary_parser.js index fadfaed7..e52eea42 100644 --- a/lib/binary_parser.js +++ b/lib/binary_parser.js @@ -309,7 +309,7 @@ Parser.prototype.addRawCode = function(ctx) { this.resolveReferences(ctx); - ctx.pushCode("return vars;"); + ctx.pushCode("vars.__bytesRead = offset; return vars;"); }; Parser.prototype.addRawCodeEncode = function(ctx) {