Fix #44
This commit is contained in:
@@ -55,6 +55,8 @@ func (d *Reader) Read(buf []byte) (int, error) {
|
|||||||
}
|
}
|
||||||
toRead = min(len(d.curBlock)-int(d.curOffset), len(buf)-totRed)
|
toRead = min(len(d.curBlock)-int(d.curOffset), len(buf)-totRed)
|
||||||
copy(buf[totRed:], d.curBlock[d.curOffset:d.curOffset+uint32(toRead)])
|
copy(buf[totRed:], d.curBlock[d.curOffset:d.curOffset+uint32(toRead)])
|
||||||
|
totRed += toRead
|
||||||
|
d.curOffset += uint32(toRead)
|
||||||
}
|
}
|
||||||
return totRed, nil
|
return totRed, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user