Skip to content

Commit

Permalink
Fix problem decoding tag array of type "B,C". The computed length of …
Browse files Browse the repository at this point in the history
…the array was wrong.
  • Loading branch information
jrobinso committed Oct 2, 2024
1 parent a2d681b commit b1aab14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cramFile/slice/decodeRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ function readNullTerminatedString(buffer: Uint8Array) {
*/
function parseTagValueArray(buffer: Uint8Array) {
const arrayType = String.fromCharCode(buffer[0]!)
const length = Int32Array.from(buffer.slice(1))[0]!

//const length = Int32Array.from(buffer.slice(1))[0]!

Check failure on line 36 in src/cramFile/slice/decodeRecord.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test on node 20.x and ubuntu-latest

Expected space or tab after '//' in comment
const dataView = new DataView(buffer.buffer)
const littleEndian = true
const length = dataView.getUint32(1, littleEndian)

const array: number[] = new Array(length)
buffer = buffer.slice(5)
Expand Down

0 comments on commit b1aab14

Please sign in to comment.