Skip to content

Commit

Permalink
fix: correct function signatures for lengthInBytes and readUntil in c…
Browse files Browse the repository at this point in the history
…lassfile.ts
  • Loading branch information
Kreijstal committed Oct 2, 2024
1 parent 7ee4e11 commit 9b82362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/classfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ var ConstantClassInfo = Parser.start().uint16be("name_index");
InstructionParser
]
}),
lengthInBytes: function (item, buffer) {
lengthInBytes: function (item) {
//console.log("eyy", this, this.$parent.code_length);
return this.$parent.code_length;
}
Expand Down Expand Up @@ -772,7 +772,7 @@ var ConstantClassInfo = Parser.start().uint16be("name_index");
.uint16("count")
.array("entries", {
type: CpInfo,
readUntil: function (item, buffer, offset) {
readUntil: function (item, buffer) {
if (this.entries.length >= this.count - 1) return true;
// Check if we've just read a long or double
if (item.tag === 5 || item.tag === 6) {
Expand Down

0 comments on commit 9b82362

Please sign in to comment.