Fix BGZFile.read() behaviour near or at EOF
Fix typo, which caused read() (with a size given) to return uninitialised
data of exactly the size requested instead of ever signalling EOF.
@@ -115,7 +115,7 @@ cdef class BGZFile(object):
if read_size < 0:
raise IOError('Error reading from BGZFile')
elif read_size < size:
- chunk = chunk[:size]
+ chunk = chunk[:read_size]
return chunk
else:
return b''
