avsa242 / sdfat-spin

FAT-fs on SD implementation for the P8X32A/Propeller, P2X8C4M64P/Propeller 2
Other
0 stars 0 forks source link

Find() loops all 16 iterations when it should find the file #13

Closed avsa242 closed 2 years ago

avsa242 commented 2 years ago

The dirent # is 1 every iteration except the first, which is 0. It doesn't seem to find the file at dirent 2 even though it's there.

avsa242 commented 2 years ago

The reason is in the logic for checking if the dirent is a deleted entry, it immediately directs the repeat loop to the next iteration, but doesn't advance the dirent #, so it never gets past the first deleted file.