Open howardthuang opened 1 year ago
https://github.com/nibblebits/PeachOS/blob/master/src/fs/fat/fat16.c#L411:
if (entry == 0xFF8 || entry == 0xFFF)
This line is checking if the cluster entry is the last cluster in a file. However, the value it is checking for is incorrect. The EOC (end of chain) mark for FAT16 should be 0xFFF8 - 0xFFFF.
Thank you for fileing the issue report
https://github.com/nibblebits/PeachOS/blob/master/src/fs/fat/fat16.c#L411:
if (entry == 0xFF8 || entry == 0xFFF)
This line is checking if the cluster entry is the last cluster in a file. However, the value it is checking for is incorrect. The EOC (end of chain) mark for FAT16 should be 0xFFF8 - 0xFFFF.