Skip to content

Commit

Permalink
Fix buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitrijsBarbarinsFreiheit committed Oct 21, 2021
1 parent 61174a9 commit 09ccf09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions read.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ func readNativeFrames(d dicomio.Reader, parsedData *Dataset, fc chan<- *frame.Fr
image.Frames = make([]frame.Frame, nFrames)
//bo := d.ByteOrder()
bytesAllocated := bitsAllocated / 8
pixelBuf := make([]byte, bytesAllocated)

frameSize := bytesAllocated * samplesPerPixel * pixelsPerFrame

Expand All @@ -290,7 +289,7 @@ func readNativeFrames(d dicomio.Reader, parsedData *Dataset, fc chan<- *frame.Fr


buf := make([]byte, frameSize)
_, err := io.ReadFull(d, pixelBuf)
_, err := io.ReadFull(d, buf)
if err != nil {
return nil, bytesRead,
fmt.Errorf("could not read uint%d from input: %w", bitsAllocated, err)
Expand Down

0 comments on commit 09ccf09

Please sign in to comment.