Skip to content

Commit 204705b

Browse files
array readuntil bugfix
1 parent fa74c9b commit 204705b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/binary_parser.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,11 +701,9 @@ export class Parser {
701701
this.generateEncode(ctx);
702702

703703
ctx.markResolved(this.alias);
704-
705704
this.resolveReferences(ctx, 'encode');
706705

707706
ctx.pushCode('return smartBuffer.toBuffer();');
708-
709707
ctx.pushCode('}');
710708

711709
return ctx;
@@ -1397,7 +1395,7 @@ export class Parser {
13971395
} else if (typeof this.options.readUntil === 'function') {
13981396
ctx.pushCode(
13991397
` while (${itemCounter} < ${maxItems} && !(${
1400-
this.options.encodeUntil}).call(this, ${item}, ${savSmartBuffer}.toBuffer()));`
1398+
this.options.readUntil}).call(this, ${item}, ${savSmartBuffer}.toBuffer()));`
14011399
);
14021400
}
14031401
ctx.pushCode('}'); // End of 'if(...) {'

0 commit comments

Comments
 (0)