Closed airnandez closed 6 years ago
right.
I think it actually would be better to use io.ReadFull
.
(care to send a PR?)
(I am on holidays till 1st of March)
Yes, using io.ReadFull
would be better. I will try something on my side and send a PR.
Thanks!
Pull request submitted.
fixed with a1d964b.
When decoding a FITS file, an
io.Reader
can return both the requested number of bytes AND anerror
(for instance EOF).Here we should first check that the requested number of bytes were returned (here
pad
), in which caseerr
can be either ignored or, best, checked againstEOF
.