Skip to content

Commit

Permalink
Merge pull request #22 from TrustNXT/fix/uuid-box-parsing
Browse files Browse the repository at this point in the history
UUIDBox: Fix parsing
  • Loading branch information
UlrichEckhardt authored Jul 18, 2024
2 parents 8254c39 + a16d4d7 commit b89edce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/jumbf/UUIDBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export class UUIDBox extends Box {
}

public parse(buf: Uint8Array) {
this.content = buf;
if (buf.length < 16) throw new Error('UUIDBox: Data too short');

this.uuid = buf.subarray(0, 16);
this.content = buf.subarray(16);
}

public toString(prefix?: string | undefined): string {
Expand Down

0 comments on commit b89edce

Please sign in to comment.