On 13 Jul 2023, at 23:07, Kinglong Mee wrote: > Hi Ben, > ... > Comparing with the above one, this seems work. This fixes it for me and keeps the optimization. Its quite a subtle bit of logic - maybe a comment is appropriate? One non-intuitive thing here is that array->size == 19 for a directory with 18 entries, since we count the "eof" entry as a blank entry instead of the last real entry. Ben