Commit 51191c7a authored by Alberto Ramos's avatar Alberto Ramos

Corrected bug in BDIO_seek!

Thanks to Fabian Joswig <>

When calling BDIO_seek the very last record of a bdio file cannot be
accessed due to ipt < length(fb.records)) and ipt starting at 1. If I
understand it correctly you would have to change the condition to ipt
<= length(fb.records)) in order to be able to access the last
record. I noticed this because I did not attach an additional record
containing the hash and then BDIO_seek immediately returns false.
parent bf3f88e4
......@@ -267,7 +267,7 @@ function BDIO_seek!(fb::BDIOstream, icnt::Int = 1)
ipt += icnt
if (ipt < length(fb.records))&&(ipt > 0)
if (ipt <= length(fb.records))&&(ipt > 0)
fb.ipt = ipt
fb.rwpos = 0
return true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment