Skip to content

Commit ea55fab

Browse files
authored
Merge pull request #171 from Rzial/bugfix/index-wrong-code-gen
Removed typo on code generation
2 parents 7563813 + 20bec01 commit ea55fab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/binary_parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ export class Parser {
11151115
ctx.pushCode(`${item}.$parent = ${parentVar};`);
11161116
ctx.pushCode(`${item}.$root = ${parentVar}.$root;`);
11171117
if (!this.options.readUntil && lengthInBytes === undefined) {
1118-
ctx.pushCode(`${item}.$index = ${length} - ${counter},`);
1118+
ctx.pushCode(`${item}.$index = ${length} - ${counter};`);
11191119
}
11201120
type.generate(ctx);
11211121
ctx.pushCode(`delete ${item}.$parent;`);

0 commit comments

Comments
 (0)